Preserve Issues/Gantt/Calendar tab when displaying a saved query (#7605).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4909 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-02-21 13:52:19 +00:00
parent 0efc783a7e
commit a11e3a85d6
1 changed files with 4 additions and 1 deletions

View File

@ -114,9 +114,12 @@ module IssuesHelper
end
def query_links(title, queries)
# links to #index on issues/show
url_params = controller_name == 'issues' ? {:controller => 'issues', :action => 'index', :project_id => @project} : params
content_tag('h3', title) +
queries.collect {|query|
link_to(h(query.name), :controller => 'issues', :action => 'index', :project_id => @project, :query_id => query)
link_to(h(query.name), url_params.merge(:query_id => query))
}.join('<br />')
end