Chris@1464:
Chris@1464: <%= link_to(l(:label_attachment_new), new_project_file_path(@project), :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %> Chris@1464:
Chris@1464: Chris@1464:

<%=l(:label_attachment_plural)%>

Chris@1464: Chris@1464: <% delete_allowed = User.current.allowed_to?(:manage_files, @project) %> Chris@1464: Chris@1464: Chris@1464: Chris@1464: <%= sort_header_tag('filename', :caption => l(:field_filename)) %> Chris@1464: <%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc') %> Chris@1464: <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc') %> Chris@1464: <%= sort_header_tag('downloads', :caption => l(:label_downloads_abbr), :default_order => 'desc') %> Chris@1464: Chris@1464: Chris@1464: Chris@1464: Chris@1464: <% @containers.each do |container| %> Chris@1464: <% next if container.attachments.empty? -%> Chris@1464: <% if container.is_a?(Version) -%> Chris@1464: Chris@1464: Chris@1464: Chris@1464: <% end -%> Chris@1464: <% container.attachments.each do |file| %> Chris@1464: "> Chris@1464: Chris@1464: Chris@1464: Chris@1464: Chris@1464: Chris@1464: Chris@1464: Chris@1464: <% end Chris@1464: reset_cycle %> Chris@1464: <% end %> Chris@1464: Chris@1464:
MD5
Chris@1464: <%= link_to(h(container), {:controller => 'versions', :action => 'show', :id => container}, :class => "icon icon-package") %> Chris@1464:
<%= link_to_attachment file, :download => true, :title => file.description %><%= format_time(file.created_on) %><%= number_to_human_size(file.filesize) %><%= file.downloads %><%= file.digest %> Chris@1464: <%= link_to(image_tag('delete.png'), attachment_path(file), Chris@1464: :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %> Chris@1464:
Chris@1464: Chris@1464: <% html_title(l(:label_attachment_plural)) -%>