diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-08-09 14:53:23 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-08-09 14:53:23 +0000 |
commit | a1b89a53eb7a6893863e787c2930fddde3385717 (patch) | |
tree | 80cacb905324e8071b518984bffd3f7e528d0dcf /app | |
parent | e00884bcca90eabf8de5f8371f0ba8773942a4b8 (diff) | |
download | redmine-a1b89a53eb7a6893863e787c2930fddde3385717.tar.gz redmine-a1b89a53eb7a6893863e787c2930fddde3385717.zip |
Refactor: extract POST version of IssuesController#move to #perform_move.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3930 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/issues_controller.rb | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 7fb4148ed..a7e227c85 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -258,6 +258,18 @@ class IssuesController < ApplicationController @target_project ||= @project @trackers = @target_project.trackers @available_statuses = Workflow.available_statuses(@project) + render :layout => false if request.xhr? + end + + # TODO: more descriptive name? move to separate controller like IssueMovesController? + def perform_move + @issues.sort! + @copy = params[:copy_options] && params[:copy_options][:copy] + @allowed_projects = Issue.allowed_target_projects_on_move + @target_project = @allowed_projects.detect {|p| p.id.to_s == params[:new_project_id]} if params[:new_project_id] + @target_project ||= @project + @trackers = @target_project.trackers + @available_statuses = Workflow.available_statuses(@project) if request.post? new_tracker = params[:new_tracker_id].blank? ? nil : @target_project.trackers.find_by_id(params[:new_tracker_id]) unsaved_issue_ids = [] @@ -285,12 +297,6 @@ class IssuesController < ApplicationController end return end - render :layout => false if request.xhr? - end - - # TODO: more descriptive name? move to separate controller like IssueMovesController? - def perform_move - move end def destroy |