Mercurial > hg > soundsoftware-site
diff app/controllers/projects_controller.rb @ 124:bc91f2025d05 cannam
Make the project list into a sortable table with a little more information in it
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Tue, 18 Jan 2011 17:02:06 +0000 |
parents | 605adf7e1735 |
children | ca48d8b6f55d |
line wrap: on
line diff
--- a/app/controllers/projects_controller.rb Mon Jan 17 17:22:39 2011 +0000 +++ b/app/controllers/projects_controller.rb Tue Jan 18 17:02:06 2011 +0000 @@ -47,11 +47,13 @@ def index respond_to do |format| format.html { + sort_init 'lft' + sort_update %w(lft title created_on updated_on) @limit = per_page_option @project_count = Project.visible.count @project_pages = Paginator.new self, @project_count, @limit, params['page'] @offset ||= @project_pages.current.offset - @projects = Project.visible.all(:offset => @offset, :limit => @limit, :order => 'lft') + @projects = Project.visible.all(:offset => @offset, :limit => @limit, :order => sort_clause) if User.current.logged? @user_projects = User.current.projects end