Adds a 'Create and continue' button on project form.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6303 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-07-21 15:51:58 +00:00
parent ed23149a6c
commit f595197ecf
3 changed files with 13 additions and 2 deletions
+4 -1
View File
@@ -87,7 +87,10 @@ class ProjectsController < ApplicationController
respond_to do |format|
format.html {
flash[:notice] = l(:notice_successful_create)
redirect_to :controller => 'projects', :action => 'settings', :id => @project
redirect_to(params[:continue] ?
{:controller => 'projects', :action => 'new', :project => {:parent_id => @project.parent_id}.reject {|k,v| v.nil?}} :
{:controller => 'projects', :action => 'settings', :id => @project}
)
}
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'projects', :action => 'show', :id => @project.id) }
end