mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-15 16:56:32 +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
|
# 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
|
# not_done_todos acts_as_todo_container method Hides actions in hidden
|
||||||
# projects from context.
|
# 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
|
@count = @not_done_todos.size
|
||||||
@default_project_context_name_map = build_default_project_context_name_map(@projects).to_json
|
@default_project_context_name_map = build_default_project_context_name_map(@projects).to_json
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue