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

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

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