Fixed: "subproject of" list should not show archived projects.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@678 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-08-29 20:13:02 +00:00
parent 39c9874a41
commit 05ff26c141

View File

@ -66,7 +66,7 @@ class ProjectsController < ApplicationController
# Add a new project # Add a new project
def add def add
@custom_fields = IssueCustomField.find(:all) @custom_fields = IssueCustomField.find(:all)
@root_projects = Project.find(:all, :conditions => "parent_id is null") @root_projects = Project.find(:all, :conditions => "parent_id IS NULL AND status = #{Project::STATUS_ACTIVE}")
@project = Project.new(params[:project]) @project = Project.new(params[:project])
if request.get? if request.get?
@custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) } @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) }
@ -102,7 +102,7 @@ class ProjectsController < ApplicationController
end end
def settings def settings
@root_projects = Project::find(:all, :conditions => ["parent_id is null and id <> ?", @project.id]) @root_projects = Project::find(:all, :conditions => ["parent_id IS NULL AND status = #{Project::STATUS_ACTIVE} AND id <> ?", @project.id])
@custom_fields = IssueCustomField.find(:all) @custom_fields = IssueCustomField.find(:all)
@issue_category ||= IssueCategory.new @issue_category ||= IssueCategory.new
@member ||= @project.members.new @member ||= @project.members.new