<%= 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') %> <% 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)%> <%=l(:field_filename)%> <%=l(:label_date)%> <%=l(:field_filesize)%> D/L MD5
<%= version.name %>
<%= link_to file.filename, :controller => 'versions', :action => 'download', :id => version, :attachment_id => file %> <%= format_date(file.created_on) %> <%= human_size(file.filesize) %> <%= file.downloads %> <%= file.digest %>
<%= link_to_if_authorized '', {:controller => 'versions', :action => 'destroy_file', :id => version, :attachment_id => file}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>