diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-06 18:25:01 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-06 18:25:01 +0000 |
commit | 729bea1cf38ed80bc34c47a8ef3783d9e06ce5c5 (patch) | |
tree | 641eec746b7102036dc717e62481a3de596133d6 /app/controllers/projects_controller.rb | |
parent | 2af97616f760f1ba1bfda96cc91d51e2f3ac0b43 (diff) | |
download | redmine-729bea1cf38ed80bc34c47a8ef3783d9e06ce5c5.tar.gz redmine-729bea1cf38ed80bc34c47a8ef3783d9e06ce5c5.zip |
Moves ProjectsController#add_version to VersionsController#new.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3548 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r-- | app/controllers/projects_controller.rb | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a8ab59bd8..f0099468b 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -266,39 +266,6 @@ class ProjectsController < ApplicationController end end end - - # Add a new version to @project - def add_version - @version = @project.versions.build - if params[:version] - attributes = params[:version].dup - attributes.delete('sharing') unless attributes.nil? || @version.allowed_sharings.include?(attributes['sharing']) - @version.attributes = attributes - end - if request.post? - if @version.save - respond_to do |format| - format.html do - flash[:notice] = l(:notice_successful_create) - redirect_to :action => 'settings', :tab => 'versions', :id => @project - end - format.js do - # IE doesn't support the replace_html rjs method for select box options - render(:update) {|page| page.replace "issue_fixed_version_id", - content_tag('select', '<option></option>' + version_options_for_select(@project.shared_versions.open, @version), :id => 'issue_fixed_version_id', :name => 'issue[fixed_version_id]') - } - end - end - else - respond_to do |format| - format.html - format.js do - render(:update) {|page| page.alert(@version.errors.full_messages.join('\n')) } - end - end - end - end - end def add_file if request.post? |