mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-25 11:38:49 +01:00
fixes #678. When viewing a context, actions without projects are now shown
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@755 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
eae9927193
commit
0e7a85befd
1 changed files with 5 additions and 1 deletions
|
|
@ -166,7 +166,11 @@ class ContextsController < ApplicationController
|
|||
# search manually until I can work out a way to do the same thing using
|
||||
# not_done_todos acts_as_todo_container method Hides actions in hidden
|
||||
# projects from context.
|
||||
@not_done_todos = @context.todos.find(:all, :conditions => ['todos.state = ? AND projects.state = ?', 'active', 'active'], :order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC", :include => [:project, :tags])
|
||||
@not_done_todos = @context.todos.find(
|
||||
:all,
|
||||
:conditions => ['todos.state = ? AND (todos.project_id IS ? OR projects.state = ?)', 'active', nil, 'active'],
|
||||
:order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC",
|
||||
:include => [:project, :tags])
|
||||
@count = @not_done_todos.size
|
||||
@default_project_context_name_map = build_default_project_context_name_map(@projects).to_json
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue