##// END OF EJS Templates
add a view link to note attachment file (#4774)...
Toshi MARUYAMA -
r9192:f277f127c6e1
parent child
Show More
@@ -249,9 +249,16 module IssuesHelper
249 label = content_tag('strong', label)
249 label = content_tag('strong', label)
250 old_value = content_tag("i", h(old_value)) if detail.old_value
250 old_value = content_tag("i", h(old_value)) if detail.old_value
251 old_value = content_tag("strike", old_value) if detail.old_value and detail.value.blank?
251 old_value = content_tag("strike", old_value) if detail.old_value and detail.value.blank?
252 if detail.property == 'attachment' && !value.blank? && a = Attachment.find_by_id(detail.prop_key)
252 if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key)
253 # Link to the attachment if it has not been removed
253 # Link to the attachment if it has not been removed
254 value = link_to_attachment(a, :download => true, :only_path => options[:only_path])
254 value = link_to_attachment(atta, :download => true, :only_path => options[:only_path])
255 if atta.is_text?
256 value += link_to(
257 image_tag('magnifier.png'),
258 :controller => 'attachments', :action => 'show',
259 :id => atta, :filename => atta.filename
260 )
261 end
255 else
262 else
256 value = content_tag("i", h(value)) if value
263 value = content_tag("i", h(value)) if value
257 end
264 end
General Comments 0
You need to be logged in to leave comments. Login now