mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-25 19:48:48 +01:00
fixes #726. Thanks Eric Pallen for the fix. The mobile view showed active todos from completed projects while the home page does not.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@867 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
d07d0c4f4d
commit
b83a3b311c
1 changed files with 7 additions and 3 deletions
|
|
@ -461,7 +461,11 @@ class TodosController < ApplicationController
|
|||
@todos = Todo.find(:all, :conditions => ['todos.user_id = ?', current_user.id], :include => [ :project, :context, :tags ])
|
||||
|
||||
# Exclude hidden projects from the home page
|
||||
@not_done_todos = Todo.find(:all, :conditions => ['todos.user_id = ? AND contexts.hide = ? AND (projects.state = ? OR todos.project_id IS NULL)', current_user.id, false, 'active'], :order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC", :include => [ :project, :context, :tags ])
|
||||
@not_done_todos = Todo.find(:all,
|
||||
:conditions => ['todos.user_id = ? AND contexts.hide = ? AND (projects.state = ? OR todos.project_id IS NULL)',
|
||||
current_user.id, false, 'active'],
|
||||
:order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC",
|
||||
:include => [ :project, :context, :tags ])
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -475,8 +479,8 @@ class TodosController < ApplicationController
|
|||
|
||||
# Exclude hidden projects from the home page
|
||||
@not_done_todos = Todo.find(:all,
|
||||
:conditions => ['todos.user_id = ? AND todos.state = ? AND contexts.hide = ?',
|
||||
current_user.id, 'active', false],
|
||||
:conditions => ['todos.user_id = ? AND todos.state = ? AND contexts.hide = ? AND (projects.state = ? OR todos.project_id IS NULL)',
|
||||
current_user.id, 'active', false, 'active'],
|
||||
:order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC",
|
||||
:include => [ :project, :context ])
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue