Mercurial > hg > soundsoftware-site
comparison app/controllers/files_controller.rb @ 254:0c9da2b87ad6 feature_80
Naively display download "active" status in downloads page, and allow sorting by it
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Thu, 03 Mar 2011 18:31:22 +0000 |
parents | 94944d00e43c |
children | 3ecf99348b9f |
comparison
equal
deleted
inserted
replaced
253:82caabe96ad4 | 254:0c9da2b87ad6 |
---|---|
8 include SortHelper | 8 include SortHelper |
9 | 9 |
10 def index | 10 def index |
11 sort_init 'filename', 'asc' | 11 sort_init 'filename', 'asc' |
12 sort_update 'filename' => "#{Attachment.table_name}.filename", | 12 sort_update 'filename' => "#{Attachment.table_name}.filename", |
13 'active' => "#{Attachment.table_name}.active", | |
13 'created_on' => "#{Attachment.table_name}.created_on", | 14 'created_on' => "#{Attachment.table_name}.created_on", |
14 'size' => "#{Attachment.table_name}.filesize", | 15 'size' => "#{Attachment.table_name}.filesize", |
15 'downloads' => "#{Attachment.table_name}.downloads" | 16 'downloads' => "#{Attachment.table_name}.downloads" |
16 | 17 |
17 @containers = [ Project.find(@project.id, :include => :attachments, :order => sort_clause)] | 18 @containers = [ Project.find(@project.id, :include => :attachments, :order => sort_clause)] |