Keep filter params in 'Per page' links.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5278 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-04-01 14:50:18 +00:00
parent 4641716771
commit 25ea0f34a6
1 changed files with 2 additions and 5 deletions

View File

@ -360,14 +360,11 @@ 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),
:url => params.merge(:per_page => n),
:method => :get},
{:href => url_for(url_param.merge(:per_page => n))})
{:href => url_for(params.merge(:per_page => n))})
end
links.size > 1 ? l(:label_display_per_page, links.join(', ')) : nil
end