]> source.dussan.org Git - redmine.git/commitdiff
Preserve Issues/Gantt/Calendar tab when displaying a saved query (#7605).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 21 Feb 2011 13:52:19 +0000 (13:52 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 21 Feb 2011 13:52:19 +0000 (13:52 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4909 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/issues_helper.rb

index 38cc52fee39f35add29374d8788b789cfd6eba1d..ec027e2e02f0b0d34fdc03d91dae497cc9c4d292 100644 (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