Mercurial > hg > soundsoftware-site
comparison .svn/pristine/b6/b6a2a69382c779cf0cb5b9cf78c2974d34b88329.svn-base @ 1464:261b3d9a4903 redmine-2.4
Update to Redmine 2.4 branch rev 12663
author | Chris Cannam |
---|---|
date | Tue, 14 Jan 2014 14:37:42 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1296:038ba2d95de8 | 1464:261b3d9a4903 |
---|---|
1 <div class="contextual"> | |
2 <%= link_to(l(:label_attachment_new), new_project_file_path(@project), :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %> | |
3 </div> | |
4 | |
5 <h2><%=l(:label_attachment_plural)%></h2> | |
6 | |
7 <% delete_allowed = User.current.allowed_to?(:manage_files, @project) %> | |
8 | |
9 <table class="list files"> | |
10 <thead><tr> | |
11 <%= sort_header_tag('filename', :caption => l(:field_filename)) %> | |
12 <%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc') %> | |
13 <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc') %> | |
14 <%= sort_header_tag('downloads', :caption => l(:label_downloads_abbr), :default_order => 'desc') %> | |
15 <th>MD5</th> | |
16 <th></th> | |
17 </tr></thead> | |
18 <tbody> | |
19 <% @containers.each do |container| %> | |
20 <% next if container.attachments.empty? -%> | |
21 <% if container.is_a?(Version) -%> | |
22 <tr> | |
23 <th colspan="6"> | |
24 <%= link_to(h(container), {:controller => 'versions', :action => 'show', :id => container}, :class => "icon icon-package") %> | |
25 </th> | |
26 </tr> | |
27 <% end -%> | |
28 <% container.attachments.each do |file| %> | |
29 <tr class="file <%= cycle("odd", "even") %>"> | |
30 <td class="filename"><%= link_to_attachment file, :download => true, :title => file.description %></td> | |
31 <td class="created_on"><%= format_time(file.created_on) %></td> | |
32 <td class="filesize"><%= number_to_human_size(file.filesize) %></td> | |
33 <td class="downloads"><%= file.downloads %></td> | |
34 <td class="digest"><%= file.digest %></td> | |
35 <td class="buttons"> | |
36 <%= link_to(image_tag('delete.png'), attachment_path(file), | |
37 :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %> | |
38 </td> | |
39 </tr> | |
40 <% end | |
41 reset_cycle %> | |
42 <% end %> | |
43 </tbody> | |
44 </table> | |
45 | |
46 <% html_title(l(:label_attachment_plural)) -%> |