##// END OF EJS Templates
Change attachment link to download and add a view link for text attachments (#4774)....
Jean-Philippe Lang -
r8525:002081f2245e
parent child
Show More
1 NO CONTENT: new file 100644, binary diff hidden
@@ -210,7 +210,7 module IssuesHelper
210 210 old_value = content_tag("strike", old_value) if detail.old_value and detail.value.blank?
211 211 if detail.property == 'attachment' && !value.blank? && a = Attachment.find_by_id(detail.prop_key)
212 212 # Link to the attachment if it has not been removed
213 value = link_to_attachment(a)
213 value = link_to_attachment(a, :download => true)
214 214 else
215 215 value = content_tag("i", h(value)) if value
216 216 end
@@ -1,9 +1,14
1 1 <div class="attachments">
2 2 <% for attachment in attachments %>
3 <p><%= link_to_attachment attachment, :class => 'icon icon-attachment' -%>
4 <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
3 <p><%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
4 <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
5 5 <span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
6 <% if options[:deletable] %>
6 <% if attachment.is_text? %>
7 <%= link_to image_tag('magnifier.png'),
8 :controller => 'attachments', :action => 'show',
9 :id => attachment, :filename => attachment.filename %>
10 <% end %>
11 <% if options[:deletable] %>
7 12 <%= link_to image_tag('delete.png'), attachment_path(attachment),
8 13 :confirm => l(:text_are_you_sure),
9 14 :method => :delete,
General Comments 0
You need to be logged in to leave comments. Login now