@@ -1,44 +1,44 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <%= link_to_if_authorized l(:label_attachment_new), {:controller => 'projects', :action => 'add_file', :id => @project}, :class => 'icon icon-add' %> |
|
3 | 3 | </div> |
|
4 | 4 | |
|
5 | 5 | <h2><%=l(:label_attachment_plural)%></h2> |
|
6 | 6 | |
|
7 | 7 | <% delete_allowed = authorize_for('versions', 'destroy_file') %> |
|
8 | 8 | |
|
9 | 9 | <table class="list"> |
|
10 | 10 | <thead><tr> |
|
11 | 11 | <th><%=l(:field_version)%></th> |
|
12 | 12 | <th><%=l(:field_filename)%></th> |
|
13 | 13 | <th><%=l(:label_date)%></th> |
|
14 | 14 | <th><%=l(:field_filesize)%></th> |
|
15 | 15 | <th>D/L</th> |
|
16 | 16 | <th>MD5</th> |
|
17 | 17 | <% if delete_allowed %><th></th><% end %> |
|
18 | 18 | </tr></thead> |
|
19 | 19 | <tbody> |
|
20 | 20 | <% for version in @versions %> |
|
21 | 21 | <% unless version.attachments.empty? %> |
|
22 | 22 | <tr><th colspan="7" align="left"><span class="icon icon-package"><b><%= version.name %></b></span></th></tr> |
|
23 | 23 | <% for file in version.attachments %> |
|
24 | 24 | <tr class="<%= cycle("odd", "even") %>"> |
|
25 | 25 | <td></td> |
|
26 | 26 | <td><%= link_to file.filename, :controller => 'versions', :action => 'download', :id => version, :attachment_id => file %></td> |
|
27 | 27 | <td align="center"><%= format_date(file.created_on) %></td> |
|
28 | 28 | <td align="center"><%= number_to_human_size(file.filesize) %></td> |
|
29 | 29 | <td align="center"><%= file.downloads %></td> |
|
30 | 30 | <td align="center"><small><%= file.digest %></small></td> |
|
31 | 31 | <% if delete_allowed %> |
|
32 | 32 | <td align="center"> |
|
33 | 33 | <div class="contextual"> |
|
34 |
<%= link_to_if_authorized '', {:controller => 'versions', :action => 'destroy_file', :id => version, :attachment_id => file}, :confirm => l(:text_are_you_sure), :method => :post |
|
|
34 | <%= link_to_if_authorized image_tag('delete.png'), {:controller => 'versions', :action => 'destroy_file', :id => version, :attachment_id => file}, :confirm => l(:text_are_you_sure), :method => :post %> | |
|
35 | 35 | </div> |
|
36 | 36 | </td> |
|
37 | 37 | <% end %> |
|
38 | 38 | </tr> |
|
39 | 39 | <% end |
|
40 | 40 | reset_cycle %> |
|
41 | 41 | <% end %> |
|
42 | 42 | <% end %> |
|
43 | 43 | </tbody> |
|
44 | 44 | </table> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now