diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-07-03 12:56:27 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-07-03 12:56:27 +0000 |
commit | 7d658e1477fcbdc28b77fa8ce3e3e7c7afe72f3a (patch) | |
tree | 158841768ea55cc783c82cdd38c0483345044e9f /app/controllers/versions_controller.rb | |
parent | f2af44b6feb9266c675427cd7390bb447dc9564b (diff) | |
download | redmine-7d658e1477fcbdc28b77fa8ce3e3e7c7afe72f3a.tar.gz redmine-7d658e1477fcbdc28b77fa8ce3e3e7c7afe72f3a.zip |
Adds a 'New version' link on the roadmap.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6169 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/versions_controller.rb')
-rw-r--r-- | app/controllers/versions_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 03af71b99..30d8f3bf2 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -79,7 +79,7 @@ class VersionsController < ApplicationController respond_to do |format| format.html do flash[:notice] = l(:notice_successful_create) - redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project + redirect_back_or_default :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project end format.js do # IE doesn't support the replace_html rjs method for select box options @@ -108,7 +108,7 @@ class VersionsController < ApplicationController attributes.delete('sharing') unless @version.allowed_sharings.include?(attributes['sharing']) if @version.update_attributes(attributes) flash[:notice] = l(:notice_successful_update) - redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project + redirect_back_or_default :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project else respond_to do |format| format.html { render :action => 'edit' } @@ -127,7 +127,7 @@ class VersionsController < ApplicationController def destroy if @version.fixed_issues.empty? @version.destroy - redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project + redirect_back_or_default :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project else flash[:error] = l(:notice_unable_delete_version) redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project |