Mercurial > hg > soundsoftware-site
diff app/controllers/issue_statuses_controller.rb @ 1298:4f746d8966dd redmine_2.3_integration
Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:28:30 +0100 |
parents | 622f24f53b42 |
children |
line wrap: on
line diff
--- a/app/controllers/issue_statuses_controller.rb Fri Jun 14 09:07:32 2013 +0100 +++ b/app/controllers/issue_statuses_controller.rb Fri Jun 14 09:28:30 2013 +0100 @@ -1,5 +1,5 @@ # Redmine - project management software -# Copyright (C) 2006-2012 Jean-Philippe Lang +# Copyright (C) 2006-2013 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -25,7 +25,7 @@ def index respond_to do |format| format.html { - @issue_status_pages, @issue_statuses = paginate :issue_statuses, :per_page => 25, :order => "position" + @issue_status_pages, @issue_statuses = paginate IssueStatus.sorted, :per_page => 25 render :action => "index", :layout => false if request.xhr? } format.api { @@ -42,7 +42,7 @@ @issue_status = IssueStatus.new(params[:issue_status]) if request.post? && @issue_status.save flash[:notice] = l(:notice_successful_create) - redirect_to :action => 'index' + redirect_to issue_statuses_path else render :action => 'new' end @@ -56,7 +56,7 @@ @issue_status = IssueStatus.find(params[:id]) if request.put? && @issue_status.update_attributes(params[:issue_status]) flash[:notice] = l(:notice_successful_update) - redirect_to :action => 'index' + redirect_to issue_statuses_path else render :action => 'edit' end @@ -64,11 +64,11 @@ def destroy IssueStatus.find(params[:id]).destroy - redirect_to :action => 'index' + redirect_to issue_statuses_path rescue flash[:error] = l(:error_unable_delete_issue_status) - redirect_to :action => 'index' - end + redirect_to issue_statuses_path + end def update_issue_done_ratio if request.post? && IssueStatus.update_issue_done_ratios @@ -76,6 +76,6 @@ else flash[:error] = l(:error_issue_done_ratios_not_updated) end - redirect_to :action => 'index' + redirect_to issue_statuses_path end end