annotate app/views/attachments/_links.html.erb @ 1519:afce8026aaeb redmine-2.4-integration

Merge from branch "live"
author Chris Cannam
date Tue, 09 Sep 2014 09:34:53 +0100
parents bb32da3bea34
children
rev   line source
Chris@0 1 <div class="attachments">
Chris@0 2 <% for attachment in attachments %>
Chris@1115 3 <p><%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
Chris@1115 4 <% if attachment.is_text? %>
Chris@1115 5 <%= link_to image_tag('magnifier.png'),
Chris@1115 6 :controller => 'attachments', :action => 'show',
Chris@1115 7 :id => attachment, :filename => attachment.filename %>
Chris@1115 8 <% end %>
Chris@1115 9 <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
chris@964 10 <span class="size_and_count"><%= number_to_human_size attachment.filesize %><%= ", " + l(:label_x_downloads, :count => attachment.downloads) unless attachment.downloads == 0 %></span>
Chris@0 11 <% if options[:deletable] %>
Chris@909 12 <%= link_to image_tag('delete.png'), attachment_path(attachment),
Chris@1115 13 :data => {:confirm => l(:text_are_you_sure)},
Chris@909 14 :method => :delete,
Chris@0 15 :class => 'delete',
Chris@0 16 :title => l(:button_delete) %>
Chris@0 17 <% end %>
Chris@0 18 <% if options[:author] %>
Chris@909 19 <span class="author"><%= h(attachment.author) %>, <%= format_time(attachment.created_on) %></span>
Chris@0 20 <% end %>
Chris@0 21 </p>
Chris@0 22 <% end %>
Chris@1115 23 <% if defined?(thumbnails) && thumbnails %>
Chris@1115 24 <% images = attachments.select(&:thumbnailable?) %>
Chris@1115 25 <% if images.any? %>
Chris@1115 26 <div class="thumbnails">
Chris@1115 27 <% images.each do |attachment| %>
Chris@1115 28 <div><%= thumbnail_tag(attachment) %></div>
Chris@1115 29 <% end %>
Chris@1115 30 </div>
Chris@1115 31 <% end %>
Chris@1115 32 <% end %>
Chris@0 33 </div>