From: Jean-Philippe Lang Date: Mon, 21 Feb 2011 13:52:19 +0000 (+0000) Subject: Preserve Issues/Gantt/Calendar tab when displaying a saved query (#7605). X-Git-Tag: 1.2.0~914 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a11e3a85d61912faf05472696cc508dc44e456b8;p=redmine.git 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 --- diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 38cc52fee..ec027e2e0 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -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('
') end