[Rt-devel] RT 3.4.0 Contribution

Stephen Turner sturner at MIT.EDU
Fri Feb 11 11:32:19 EST 2005


Hello,

Would you consider this small contribution? When displaying a binary custom 
field, RT displays the file name only. This patch adds a link so that the 
file contents can be displayed.

Thanks,
Steve

PART 1 (modification):

--- /var/rt3/share/html/Elements/ShowCustomFields       Tue Feb  1 09:20:40 
2005
+++ ShowCustomFields    Fri Feb 11 11:17:36 2005
@@ -55,6 +55,8 @@
  <li>
  %   if ($CustomField->Type eq 'Image') {
  <& ShowCustomFieldImage, Object => $Value &>
+%   } elsif ($CustomField->Type eq 'Binary') {
+<& ShowCustomFieldBinary, Object => $Value &>
  %   } else {
  <%$Value->Content%>
  %   }


PART 2 (New file ShowCustomFieldBinary in /html/Elements):

%    my $url = $RT::WebPath . 
"/Download/CustomFieldValue/".$Object->Id.'/'.$Object->Content;
<a href="<% $url %>"><% $Object->Content %></a>
<%ARGS>
$Object
</%ARGS>




Stephen Turner
Senior Programmer/Analyst - Client Support Services
MIT Information Services and Technology (IS&T)

sturner at mit.edu



More information about the Rt-devel mailing list