Merged r2168 to r2171 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2172 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-12-24 11:23:17 +00:00
parent 7389b4bed0
commit 733987fbb6
18 changed files with 83 additions and 39 deletions
+6 -2
View File
@@ -197,8 +197,12 @@ class ProjectsController < ApplicationController
end
def list_files
sort_init "#{Attachment.table_name}.filename", "asc"
sort_update
sort_init 'filename', 'asc'
sort_update 'filename' => "#{Attachment.table_name}.filename",
'created_on' => "#{Attachment.table_name}.created_on",
'size' => "#{Attachment.table_name}.filesize",
'downloads' => "#{Attachment.table_name}.downloads"
@versions = @project.versions.find(:all, :include => :attachments, :order => sort_clause).sort.reverse
render :layout => !request.xhr?
end