Made the sort order of actions on the home page consistent with that on the context and project pages. Actions with the nearest due date (or the most overdue) appear at the top, followed by actions with no due date which are sorted by creation date with the newest at the bottom.

Fixes #428



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@427 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2007-02-04 16:34:17 +00:00
parent eeebfff5cc
commit 1b86ccb82c

View file

@ -286,7 +286,7 @@ class TodosController < ApplicationController
@todos = @user.todos.find(:all, :conditions => ['todos.state = ? or todos.state = ?', 'active', 'complete'], :include => [ :project, :context ])
# Exclude hidden projects from the home page
@not_done_todos = @user.todos.find(:all, :conditions => ['todos.state = ?', 'active'], :order => "todos.due ASC", :include => [ :project, :context ])
@not_done_todos = @user.todos.find(:all, :conditions => ['todos.state = ?', 'active'], :order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC", :include => [ :project, :context ])
end
def determine_down_count