To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 89 / 89ce597feae0a741c7652fb0adcafccae6118a18.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (1.35 KB)
| 1 | 1296:038ba2d95de8 | Chris | <div class="attachments"> |
|---|---|---|---|
| 2 | <% for attachment in attachments %> |
||
| 3 | <p><%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%> |
||
| 4 | <% if attachment.is_text? %> |
||
| 5 | <%= link_to image_tag('magnifier.png'),
|
||
| 6 | :controller => 'attachments', :action => 'show', |
||
| 7 | :id => attachment, :filename => attachment.filename %> |
||
| 8 | <% end %> |
||
| 9 | <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
|
||
| 10 | <span class="size">(<%= number_to_human_size attachment.filesize %>)</span> |
||
| 11 | <% if options[:deletable] %> |
||
| 12 | <%= link_to image_tag('delete.png'), attachment_path(attachment),
|
||
| 13 | :data => {:confirm => l(:text_are_you_sure)},
|
||
| 14 | :method => :delete, |
||
| 15 | :class => 'delete', |
||
| 16 | :title => l(:button_delete) %> |
||
| 17 | <% end %> |
||
| 18 | <% if options[:author] %> |
||
| 19 | <span class="author"><%= h(attachment.author) %>, <%= format_time(attachment.created_on) %></span> |
||
| 20 | <% end %> |
||
| 21 | </p> |
||
| 22 | <% end %> |
||
| 23 | <% if defined?(thumbnails) && thumbnails %> |
||
| 24 | <% images = attachments.select(&:thumbnailable?) %> |
||
| 25 | <% if images.any? %> |
||
| 26 | <div class="thumbnails"> |
||
| 27 | <% images.each do |attachment| %> |
||
| 28 | <div><%= thumbnail_tag(attachment) %></div> |
||
| 29 | <% end %> |
||
| 30 | </div> |
||
| 31 | <% end %> |
||
| 32 | <% end %> |
||
| 33 | </div> |