Ability to save Gantt query filters (#7836).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12020 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -59,7 +59,7 @@ class QueriesController < ApplicationController
|
||||
|
||||
if @query.save
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to _project_issues_path(@project, :query_id => @query)
|
||||
redirect_to_issues(:query_id => @query)
|
||||
else
|
||||
render :action => 'new', :layout => !request.xhr?
|
||||
end
|
||||
@@ -77,7 +77,7 @@ class QueriesController < ApplicationController
|
||||
|
||||
if @query.save
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to _project_issues_path(@project, :query_id => @query)
|
||||
redirect_to_issues(:query_id => @query)
|
||||
else
|
||||
render :action => 'edit'
|
||||
end
|
||||
@@ -85,7 +85,7 @@ class QueriesController < ApplicationController
|
||||
|
||||
def destroy
|
||||
@query.destroy
|
||||
redirect_to _project_issues_path(@project, :set_filter => 1)
|
||||
redirect_to_issues(:set_filter => 1)
|
||||
end
|
||||
|
||||
private
|
||||
@@ -103,4 +103,16 @@ private
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
end
|
||||
|
||||
def redirect_to_issues(options)
|
||||
if params[:gantt]
|
||||
if @project
|
||||
redirect_to project_gantt_path(@project, options)
|
||||
else
|
||||
redirect_to issues_gantt_path(options)
|
||||
end
|
||||
else
|
||||
redirect_to _project_issues_path(@project, options)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user