summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/issues_helper.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 6844236cd..250775f62 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -249,9 +249,16 @@ module IssuesHelper
label = content_tag('strong', label)
old_value = content_tag("i", h(old_value)) if detail.old_value
old_value = content_tag("strike", old_value) if detail.old_value and detail.value.blank?
- if detail.property == 'attachment' && !value.blank? && a = Attachment.find_by_id(detail.prop_key)
+ if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key)
# Link to the attachment if it has not been removed
- value = link_to_attachment(a, :download => true, :only_path => options[:only_path])
+ value = link_to_attachment(atta, :download => true, :only_path => options[:only_path])
+ if atta.is_text?
+ value += link_to(
+ image_tag('magnifier.png'),
+ :controller => 'attachments', :action => 'show',
+ :id => atta, :filename => atta.filename
+ )
+ end
else
value = content_tag("i", h(value)) if value
end