From: Jean-Philippe Lang Date: Tue, 15 Jan 2008 18:18:49 +0000 (+0000) Subject: Fixed: issue filters may be lost when paginating after r1026. X-Git-Tag: 0.7.0-RC1~221 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=35c17355fbc66a55c40f846282f955b849da1f10;p=redmine.git Fixed: issue filters may be lost when paginating after r1026. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1065 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b34b5b502..111709ce4 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -114,6 +114,8 @@ module ApplicationHelper def pagination_links_full(paginator, count=nil, options={}) page_param = options.delete(:page_param) || :page url_param = params.dup + # don't reuse params if filters are present + url_param.clear if url_param.has_key?(:set_filter) html = '' html << link_to_remote(('« ' + l(:label_previous)), @@ -138,9 +140,12 @@ module ApplicationHelper end def per_page_links(selected=nil) + url_param = params.dup + url_param.clear if url_param.has_key?(:set_filter) + links = Setting.per_page_options_array.collect do |n| n == selected ? n : link_to_remote(n, {:update => "content", :url => params.dup.merge(:per_page => n)}, - {:href => url_for(params.dup.merge(:per_page => n))}) + {:href => url_for(url_param.merge(:per_page => n))}) end links.size > 1 ? l(:label_display_per_page, links.join(', ')) : nil end