fix the sort order for tag view. It is now the same as on the home page

This commit is contained in:
Reinier Balt 2008-11-14 11:40:10 +01:00
parent 33eba10e88
commit f40c35276f

View file

@ -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