@@ -66,20 +66,20 class ProjectsController < ApplicationController | |||||
66 | :conditions => "parent_id IS NULL AND status = #{Project::STATUS_ACTIVE}", |
|
66 | :conditions => "parent_id IS NULL AND status = #{Project::STATUS_ACTIVE}", | |
67 | :order => 'name') |
|
67 | :order => 'name') | |
68 | @project = Project.new(params[:project]) |
|
68 | @project = Project.new(params[:project]) | |
69 | @project.enabled_module_names = Redmine::AccessControl.available_project_modules |
|
|||
70 | if request.get? |
|
69 | if request.get? | |
71 | @custom_values = ProjectCustomField.find(:all, :order => "#{CustomField.table_name}.position").collect { |x| CustomValue.new(:custom_field => x, :customized => @project) } |
|
70 | @custom_values = ProjectCustomField.find(:all, :order => "#{CustomField.table_name}.position").collect { |x| CustomValue.new(:custom_field => x, :customized => @project) } | |
72 | @project.trackers = Tracker.all |
|
71 | @project.trackers = Tracker.all | |
73 | @project.is_public = Setting.default_projects_public? |
|
72 | @project.is_public = Setting.default_projects_public? | |
|
73 | @project.enabled_module_names = Redmine::AccessControl.available_project_modules | |||
74 | else |
|
74 | else | |
75 | @project.custom_fields = CustomField.find(params[:custom_field_ids]) if params[:custom_field_ids] |
|
75 | @project.custom_fields = CustomField.find(params[:custom_field_ids]) if params[:custom_field_ids] | |
76 | @custom_values = ProjectCustomField.find(:all, :order => "#{CustomField.table_name}.position").collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => (params[:custom_fields] ? params["custom_fields"][x.id.to_s] : nil)) } |
|
76 | @custom_values = ProjectCustomField.find(:all, :order => "#{CustomField.table_name}.position").collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => (params[:custom_fields] ? params["custom_fields"][x.id.to_s] : nil)) } | |
77 | @project.custom_values = @custom_values |
|
77 | @project.custom_values = @custom_values | |
|
78 | @project.enabled_module_names = params[:enabled_modules] | |||
78 | if @project.save |
|
79 | if @project.save | |
79 | @project.enabled_module_names = params[:enabled_modules] |
|
|||
80 | flash[:notice] = l(:notice_successful_create) |
|
80 | flash[:notice] = l(:notice_successful_create) | |
81 | redirect_to :controller => 'admin', :action => 'projects' |
|
81 | redirect_to :controller => 'admin', :action => 'projects' | |
82 |
|
|
82 | end | |
83 | end |
|
83 | end | |
84 | end |
|
84 | end | |
85 |
|
85 |
General Comments 0
You need to be logged in to leave comments.
Login now