@@ -66,7 +66,7 class ProjectsController < ApplicationController | |||||
66 | # Add a new project |
|
66 | # Add a new project | |
67 | def add |
|
67 | def add | |
68 | @custom_fields = IssueCustomField.find(:all) |
|
68 | @custom_fields = IssueCustomField.find(:all) | |
69 |
@root_projects = Project.find(:all, :conditions => "parent_id |
|
69 | @root_projects = Project.find(:all, :conditions => "parent_id IS NULL AND status = #{Project::STATUS_ACTIVE}") | |
70 | @project = Project.new(params[:project]) |
|
70 | @project = Project.new(params[:project]) | |
71 | if request.get? |
|
71 | if request.get? | |
72 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) } |
|
72 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) } | |
@@ -102,7 +102,7 class ProjectsController < ApplicationController | |||||
102 | end |
|
102 | end | |
103 |
|
103 | |||
104 | def settings |
|
104 | def settings | |
105 |
@root_projects = Project::find(:all, :conditions => ["parent_id |
|
105 | @root_projects = Project::find(:all, :conditions => ["parent_id IS NULL AND status = #{Project::STATUS_ACTIVE} AND id <> ?", @project.id]) | |
106 | @custom_fields = IssueCustomField.find(:all) |
|
106 | @custom_fields = IssueCustomField.find(:all) | |
107 | @issue_category ||= IssueCategory.new |
|
107 | @issue_category ||= IssueCategory.new | |
108 | @member ||= @project.members.new |
|
108 | @member ||= @project.members.new |
General Comments 0
You need to be logged in to leave comments.
Login now