fix #1255. Context view now has seperate container for pending and deferred todos

This commit is contained in:
Reinier Balt 2012-03-23 14:04:55 +01:00
parent e1c0ff0683
commit dd957f0feb
10 changed files with 475 additions and 431 deletions

View file

@ -277,10 +277,13 @@ 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.not_completed(
@not_done_todos = @context.todos.active(
:order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC",
:include => Todo::DEFAULT_INCLUDES)
@deferred = @context.todos.deferred(:include => Todo::DEFAULT_INCLUDES)
@pending = @context.todos.pending(:include => Todo::DEFAULT_INCLUDES)
@projects = current_user.projects
@count = @not_done_todos.size