annotate .svn/pristine/89/89ce597feae0a741c7652fb0adcafccae6118a18.svn-base @ 1298:4f746d8966dd
redmine_2.3_integration
Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author |
Chris Cannam |
date |
Fri, 14 Jun 2013 09:28:30 +0100 |
parents |
622f24f53b42 |
children |
|
rev |
line source |
Chris@1295
|
1 <div class="attachments">
|
Chris@1295
|
2 <% for attachment in attachments %>
|
Chris@1295
|
3 <p><%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
Chris@1295
|
4 <% if attachment.is_text? %>
|
Chris@1295
|
5 <%= link_to image_tag('magnifier.png'),
|
Chris@1295
|
6 :controller => 'attachments', :action => 'show',
|
Chris@1295
|
7 :id => attachment, :filename => attachment.filename %>
|
Chris@1295
|
8 <% end %>
|
Chris@1295
|
9 <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
|
Chris@1295
|
10 <span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
|
Chris@1295
|
11 <% if options[:deletable] %>
|
Chris@1295
|
12 <%= link_to image_tag('delete.png'), attachment_path(attachment),
|
Chris@1295
|
13 :data => {:confirm => l(:text_are_you_sure)},
|
Chris@1295
|
14 :method => :delete,
|
Chris@1295
|
15 :class => 'delete',
|
Chris@1295
|
16 :title => l(:button_delete) %>
|
Chris@1295
|
17 <% end %>
|
Chris@1295
|
18 <% if options[:author] %>
|
Chris@1295
|
19 <span class="author"><%= h(attachment.author) %>, <%= format_time(attachment.created_on) %></span>
|
Chris@1295
|
20 <% end %>
|
Chris@1295
|
21 </p>
|
Chris@1295
|
22 <% end %>
|
Chris@1295
|
23 <% if defined?(thumbnails) && thumbnails %>
|
Chris@1295
|
24 <% images = attachments.select(&:thumbnailable?) %>
|
Chris@1295
|
25 <% if images.any? %>
|
Chris@1295
|
26 <div class="thumbnails">
|
Chris@1295
|
27 <% images.each do |attachment| %>
|
Chris@1295
|
28 <div><%= thumbnail_tag(attachment) %></div>
|
Chris@1295
|
29 <% end %>
|
Chris@1295
|
30 </div>
|
Chris@1295
|
31 <% end %>
|
Chris@1295
|
32 <% end %>
|
Chris@1295
|
33 </div>
|