Chris@1295:
Chris@1295: <% for attachment in attachments %> Chris@1295:

<%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%> Chris@1295: <% if attachment.is_text? %> Chris@1295: <%= link_to image_tag('magnifier.png'), Chris@1295: :controller => 'attachments', :action => 'show', Chris@1295: :id => attachment, :filename => attachment.filename %> Chris@1295: <% end %> Chris@1295: <%= h(" - #{attachment.description}") unless attachment.description.blank? %> Chris@1295: (<%= number_to_human_size attachment.filesize %>) Chris@1295: <% if options[:deletable] %> Chris@1295: <%= link_to image_tag('delete.png'), attachment_path(attachment), Chris@1295: :data => {:confirm => l(:text_are_you_sure)}, Chris@1295: :method => :delete, Chris@1295: :class => 'delete', Chris@1295: :title => l(:button_delete) %> Chris@1295: <% end %> Chris@1295: <% if options[:author] %> Chris@1295: <%= h(attachment.author) %>, <%= format_time(attachment.created_on) %> Chris@1295: <% end %> Chris@1295:

Chris@1295: <% end %> Chris@1295: <% if defined?(thumbnails) && thumbnails %> Chris@1295: <% images = attachments.select(&:thumbnailable?) %> Chris@1295: <% if images.any? %> Chris@1295:
Chris@1295: <% images.each do |attachment| %> Chris@1295:
<%= thumbnail_tag(attachment) %>
Chris@1295: <% end %> Chris@1295:
Chris@1295: <% end %> Chris@1295: <% end %> Chris@1295: