diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-08-31 15:12:58 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-08-31 15:12:58 +0000 |
commit | daa8eaa9aebcc284e2904d1258cbfdd78ea23876 (patch) | |
tree | bf0238ae2199c787134a9f3bfdee2468c8832b82 /app/views/projects | |
parent | a188abbe2813372d426afd2ab05841f0503f00c1 (diff) | |
download | redmine-daa8eaa9aebcc284e2904d1258cbfdd78ea23876.tar.gz redmine-daa8eaa9aebcc284e2904d1258cbfdd78ea23876.zip |
Refactor: move method, ProjectsController#list_files to FilesController#index.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4051 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/list_files.rhtml | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/app/views/projects/list_files.rhtml b/app/views/projects/list_files.rhtml deleted file mode 100644 index 2b2e5e870..000000000 --- a/app/views/projects/list_files.rhtml +++ /dev/null @@ -1,46 +0,0 @@ -<div class="contextual"> -<%= link_to_if_authorized l(:label_attachment_new), {:controller => 'projects', :action => 'add_file', :id => @project}, :class => 'icon icon-add' %> -</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'), {:controller => 'attachments', :action => 'destroy', :id => file}, - :confirm => l(:text_are_you_sure), :method => :post) if delete_allowed %> - </td> - </tr> - <% end - reset_cycle %> -<% end %> - </tbody> -</table> - -<% html_title(l(:label_attachment_plural)) -%> |