summaryrefslogtreecommitdiffstats
path: root/app/controllers/timelog_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-21 10:37:19 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-21 10:37:19 +0000
commit1d07bb91a7d1ec1c4eef3b4df5141419b35c213a (patch)
treeebb1958854cb2f236b876e5be44abc266faf6a5f /app/controllers/timelog_controller.rb
parent11725be2788bfb3c100e82e4b24fc49c5303cd29 (diff)
downloadredmine-1d07bb91a7d1ec1c4eef3b4df5141419b35c213a.tar.gz
redmine-1d07bb91a7d1ec1c4eef3b4df5141419b35c213a.zip
Adds a 'Create and continue' button on the spent time form (#9995).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8687 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/timelog_controller.rb')
-rw-r--r--app/controllers/timelog_controller.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb
index 220954735..e1895f5de 100644
--- a/app/controllers/timelog_controller.rb
+++ b/app/controllers/timelog_controller.rb
@@ -127,8 +127,12 @@ class TimelogController < ApplicationController
if @time_entry.save
respond_to do |format|
format.html {
- flash[:notice] = l(:notice_successful_update)
- redirect_back_or_default :action => 'index', :project_id => @time_entry.project
+ flash[:notice] = l(:notice_successful_create)
+ if params[:continue]
+ redirect_to :action => 'new', :project_id => @time_entry.project, :issue_id => @time_entry.issue
+ else
+ redirect_back_or_default :action => 'index', :project_id => @time_entry.project
+ end
}
format.api { render :action => 'show', :status => :created, :location => time_entry_url(@time_entry) }
end