From f40c35276f82fc8d361df31f89c9718db7bb2ad3 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Fri, 14 Nov 2008 11:40:10 +0100 Subject: [PATCH] fix the sort order for tag view. It is now the same as on the home page --- app/controllers/todos_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index 6bfbc7e3..aead74a1 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -383,7 +383,7 @@ class TodosController < ApplicationController @not_done_todos = tag_collection.find(:all, :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'active'], - :order => 'todos.completed_at DESC, todos.created_at DESC') + :order => 'todos.due IS NULL, todos.due ASC, todos.created_at ASC') @hidden_todos = current_user.todos.find(:all, :include => [:taggings, :tags, :context], :conditions => ['tags.name = ? AND (todos.state = ? OR (contexts.hide = ? AND todos.state = ?))', @tag_name, 'project_hidden', true, 'active'], @@ -391,6 +391,7 @@ class TodosController < ApplicationController @deferred = tag_collection.find(:all, :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'deferred'], :order => 'show_from ASC, todos.created_at DESC') + # If you've set no_completed to zero, the completed items box isn't shown on # the tag page max_completed = current_user.prefs.show_number_completed