From 1d07bb91a7d1ec1c4eef3b4df5141419b35c213a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 21 Jan 2012 10:37:19 +0000 Subject: 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 --- app/controllers/timelog_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/controllers/timelog_controller.rb') 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 -- cgit v1.2.3