summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-16 17:20:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-16 17:20:41 +0000
commitffa6c5fe3e1eb67fca0d965ca45a06c56921276d (patch)
treecb8a2f40fead6826a1a8468d172bb67b4a12272e /app
parentd28d2d5ab8be4f54eb79f71be301edb659eb87ba (diff)
downloadredmine-ffa6c5fe3e1eb67fca0d965ca45a06c56921276d.tar.gz
redmine-ffa6c5fe3e1eb67fca0d965ca45a06c56921276d.zip
Adds a 'Create and continue' button on the new issue form, that will create the issue and display the form again (#2523).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2265 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/issues_controller.rb3
-rw-r--r--app/views/issues/new.rhtml1
2 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index a2b659f90..3b7587c15 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -148,7 +148,8 @@ class IssuesController < ApplicationController
flash[:notice] = l(:notice_successful_create)
Mailer.deliver_issue_add(@issue) if Setting.notified_events.include?('issue_added')
call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue})
- redirect_to :controller => 'issues', :action => 'show', :id => @issue
+ redirect_to(params[:continue] ? { :action => 'new', :tracker_id => @issue.tracker } :
+ { :action => 'show', :id => @issue })
return
end
end
diff --git a/app/views/issues/new.rhtml b/app/views/issues/new.rhtml
index 732a562a3..1bae6abaa 100644
--- a/app/views/issues/new.rhtml
+++ b/app/views/issues/new.rhtml
@@ -7,6 +7,7 @@
<%= render :partial => 'issues/form', :locals => {:f => f} %>
</div>
<%= submit_tag l(:button_create) %>
+ <%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
<%= link_to_remote l(:label_preview),
{ :url => { :controller => 'issues', :action => 'preview', :project_id => @project },
:method => 'post',