Mercurial > hg > soundsoftware-site
comparison app/views/files/.svn/text-base/index.html.erb.svn-base @ 22:40f7cfd4df19
* Update to SVN trunk rev 4173
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 24 Sep 2010 14:06:04 +0100 |
parents | |
children | 94944d00e43c |
comparison
equal
deleted
inserted
replaced
14:1d32c0a0efbf | 22:40f7cfd4df19 |
---|---|
1 <div class="contextual"> | |
2 <%= link_to_if_authorized l(:label_attachment_new), new_project_file_path(@project), :class => 'icon icon-add' %> | |
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" align="left"> | |
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 align="center"> | |
36 <%= link_to(image_tag('delete.png'), {:controller => 'attachments', :action => 'destroy', :id => file}, | |
37 :confirm => l(:text_are_you_sure), :method => :post) 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)) -%> |