<%= link_to_if_authorized l(:label_attachment_new), {:controller => 'projects', :action => 'add_file', :id => @project}, :class => 'icon icon-add' %>

<%=l(:label_attachment_plural)%>

<% delete_allowed = authorize_for('versions', 'destroy_file') %> <%= sort_header_tag("#{Attachment.table_name}.filename", :caption => l(:field_filename)) %> <%= sort_header_tag("#{Attachment.table_name}.created_on", :caption => l(:label_date), :default_order => 'desc') %> <%= sort_header_tag("#{Attachment.table_name}.filesize", :caption => l(:field_filesize), :default_order => 'desc') %> <%= sort_header_tag("#{Attachment.table_name}.downloads", :caption => l(:label_downloads_abbr), :default_order => 'desc') %> <% if delete_allowed %><% end %> <% for version in @versions %> <% unless version.attachments.empty? %> <% for file in version.attachments %> "> <% if delete_allowed %> <% end %> <% end reset_cycle %> <% end %> <% end %>
<%=l(:field_version)%>MD5
<%= version.name %>
<%= link_to(file.filename, {:controller => 'versions', :action => 'download', :id => version, :attachment_id => file}, :title => file.description) %> <%= format_time(file.created_on) %> <%= number_to_human_size(file.filesize) %> <%= file.downloads %> <%= file.digest %> <%= 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 %>
<% html_title(l(:label_attachment_plural)) -%>