Mercurial > hg > soundsoftware-site
diff .svn/pristine/9e/9ef9d001fab3e27db69ad84d6d28e74243cc2720.svn-base @ 909:cbb26bc654de redmine-1.3
Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2012 19:09:32 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.svn/pristine/9e/9ef9d001fab3e27db69ad84d6d28e74243cc2720.svn-base Fri Feb 24 19:09:32 2012 +0000 @@ -0,0 +1,46 @@ +<div class="contextual"> +<%= link_to(l(:label_attachment_new), new_project_file_path(@project), :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %> +</div> + +<h2><%=l(:label_attachment_plural)%></h2> + +<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %> + +<table class="list files"> + <thead><tr> + <%= sort_header_tag('filename', :caption => l(:field_filename)) %> + <%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc') %> + <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc') %> + <%= sort_header_tag('downloads', :caption => l(:label_downloads_abbr), :default_order => 'desc') %> + <th>MD5</th> + <th></th> + </tr></thead> + <tbody> +<% @containers.each do |container| %> + <% next if container.attachments.empty? -%> + <% if container.is_a?(Version) -%> + <tr> + <th colspan="6" align="left"> + <%= link_to(h(container), {:controller => 'versions', :action => 'show', :id => container}, :class => "icon icon-package") %> + </th> + </tr> + <% end -%> + <% container.attachments.each do |file| %> + <tr class="file <%= cycle("odd", "even") %>"> + <td class="filename"><%= link_to_attachment file, :download => true, :title => file.description %></td> + <td class="created_on"><%= format_time(file.created_on) %></td> + <td class="filesize"><%= number_to_human_size(file.filesize) %></td> + <td class="downloads"><%= file.downloads %></td> + <td class="digest"><%= file.digest %></td> + <td align="center"> + <%= link_to(image_tag('delete.png'), attachment_path(file), + :confirm => l(:text_are_you_sure), :method => :delete) if delete_allowed %> + </td> + </tr> + <% end + reset_cycle %> +<% end %> + </tbody> +</table> + +<% html_title(l(:label_attachment_plural)) -%>