Completed projects no longer appear in the Projects drop down on all the forms. Fixes #66.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@105 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2005-06-12 12:14:30 +00:00
parent 6c44e5231b
commit 3f90096bb8
3 changed files with 13 additions and 13 deletions

View file

@ -17,7 +17,7 @@ class TodoController < ApplicationController
#
def list
@page_title = "TRACKS::List tasks"
@projects = Project.find( :all, :order => "position ASC" )
@projects = Project.find( :all, :conditions => "done=0", :order => "position ASC" )
@places = Context.find( :all, :order => "position ASC" )
@shown_places = Context.find( :all, :conditions => "hide=0", :order => "position ASC" )
@hidden_places = Context.find( :all, :conditions => "hide=1", :order => "position ASC" )
@ -71,7 +71,7 @@ class TodoController < ApplicationController
# Parameters from form fields are passed to create new action
# in the selected context.
def add_item
@projects = Project.find( :all, :order => "position ASC" )
@projects = Project.find( :all, :conditions => "done=0", :order => "position ASC" )
@places = Context.find( :all, :order => "position ASC" )
item = Todo.new
@ -95,7 +95,7 @@ class TodoController < ApplicationController
#
def update_action
@places = Context.find(:all, :order => "position ASC")
@projects = Project.find(:all, :order => "position ASC")
@projects = Project.find( :all, :conditions => "done=0", :order => "position ASC" )
action = Todo.find(params[:id])
action.attributes = @params["item"]
if action.due?
@ -127,7 +127,7 @@ class TodoController < ApplicationController
# Toggles the 'done' status of the action
#
def toggle_check
@projects = Project.find(:all, :order => "position ASC")
@projects = Project.find( :all, :conditions => "done=0", :order => "position ASC" )
@places = Context.find(:all, :order => "position ASC")
item = Todo.find(@params['id'])