annotate .svn/pristine/65/65e02704959a4eede1859ab38db94f171c07d983.svn-base @ 1295:622f24f53b42 redmine-2.3

Update to Redmine SVN revision 11972 on 2.3-stable branch
author Chris Cannam
date Fri, 14 Jun 2013 09:02:21 +0100
parents
children
rev   line source
Chris@1295 1 <div class="contextual">
Chris@1295 2 <%= link_to(l(:label_attachment_new), new_project_file_path(@project), :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
Chris@1295 3 </div>
Chris@1295 4
Chris@1295 5 <h2><%=l(:label_attachment_plural)%></h2>
Chris@1295 6
Chris@1295 7 <% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
Chris@1295 8
Chris@1295 9 <table class="list files">
Chris@1295 10 <thead><tr>
Chris@1295 11 <%= sort_header_tag('filename', :caption => l(:field_filename)) %>
Chris@1295 12 <%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc') %>
Chris@1295 13 <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc') %>
Chris@1295 14 <%= sort_header_tag('downloads', :caption => l(:label_downloads_abbr), :default_order => 'desc') %>
Chris@1295 15 <th>MD5</th>
Chris@1295 16 <th></th>
Chris@1295 17 </tr></thead>
Chris@1295 18 <tbody>
Chris@1295 19 <% @containers.each do |container| %>
Chris@1295 20 <% next if container.attachments.empty? -%>
Chris@1295 21 <% if container.is_a?(Version) -%>
Chris@1295 22 <tr>
Chris@1295 23 <th colspan="6" align="left">
Chris@1295 24 <%= link_to(h(container), {:controller => 'versions', :action => 'show', :id => container}, :class => "icon icon-package") %>
Chris@1295 25 </th>
Chris@1295 26 </tr>
Chris@1295 27 <% end -%>
Chris@1295 28 <% container.attachments.each do |file| %>
Chris@1295 29 <tr class="file <%= cycle("odd", "even") %>">
Chris@1295 30 <td class="filename"><%= link_to_attachment file, :download => true, :title => file.description %></td>
Chris@1295 31 <td class="created_on"><%= format_time(file.created_on) %></td>
Chris@1295 32 <td class="filesize"><%= number_to_human_size(file.filesize) %></td>
Chris@1295 33 <td class="downloads"><%= file.downloads %></td>
Chris@1295 34 <td class="digest"><%= file.digest %></td>
Chris@1295 35 <td align="center">
Chris@1295 36 <%= link_to(image_tag('delete.png'), attachment_path(file),
Chris@1295 37 :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
Chris@1295 38 </td>
Chris@1295 39 </tr>
Chris@1295 40 <% end
Chris@1295 41 reset_cycle %>
Chris@1295 42 <% end %>
Chris@1295 43 </tbody>
Chris@1295 44 </table>
Chris@1295 45
Chris@1295 46 <% html_title(l(:label_attachment_plural)) -%>