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

@ -26,7 +26,7 @@ class ContextController < ApplicationController
def show
@context = Context.find_by_name(deurlize(@params["name"]))
@places = Context.find(:all, :order => "position ASC")
@projects = Project.find(:all, :order => "position ASC")
@projects = Project.find( :all, :conditions => "done=0", :order => "position ASC" )
@page_title = "TRACKS::Context: #{@context.name}"
@not_done = Todo.find(:all, :conditions => "done=0 AND context_id=#{@context.id}",
:order => "due IS NULL, due ASC, created ASC")
@ -64,7 +64,7 @@ class ContextController < 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?
@ -85,7 +85,7 @@ class ContextController < ApplicationController
# Parameters from form fields are passed to create new action
#
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
@ -134,7 +134,7 @@ class ContextController < ApplicationController
#
def toggle_check
@places = Context.find(:all, :order => "position ASC")
@projects = Project.find(:all, :order => "position ASC")
@projects = Project.find( :all, :conditions => "done=0", :order => "position ASC" )
item = Todo.find(params[:id])