First step in adding deferred section to the project detail page. Ajax needs a lot of work on this page.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@385 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2006-12-30 09:52:39 +00:00
parent a65e66168c
commit 6e5b574406
8 changed files with 159 additions and 111 deletions

View file

@ -2,7 +2,6 @@ class ProjectController < ApplicationController
helper :todo
before_filter :init, :except => [:create, :destroy, :order, :toggle_project_done]
before_filter :init_todos, :only => :show
def index
init_project_hidden_todo_counts
@ -17,7 +16,12 @@ class ProjectController < ApplicationController
# e.g. <home>/project/show/<project_name> shows just <project_name>.
#
def show
check_user_set_project
@page_title = "TRACKS::Project: #{@project.name}"
@not_done = @project.not_done_todos(:include_project_hidden_todos => true)
@deferred = @project.deferred_todos
@done = @project.done_todos
@count = @not_done.size
end
# Example XML usage: curl -H 'Accept: application/xml' -H 'Content-Type: application/xml'
@ -167,11 +171,4 @@ class ProjectController < ApplicationController
init_data_for_sidebar
end
def init_todos
check_user_set_project
@done = @project.done_todos
@not_done = @project.not_done_todos(:include_project_hidden_todos => true)
@count = @not_done.size
end
end