summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-03 19:22:56 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-03 19:22:56 +0000
commit1c0971b12c6060144e2ea067d93f8e44e8046988 (patch)
treef7dfd490acc757443b6658f76b47e58f3ce4fadb
parent2db9bdf7a2f6d3a90945c9fafeb27d9b396b714d (diff)
downloadredmine-1c0971b12c6060144e2ea067d93f8e44e8046988.tar.gz
redmine-1c0971b12c6060144e2ea067d93f8e44e8046988.zip
Fixed pagination on users/list (status filter lost)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@409 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/application_helper.rb12
-rw-r--r--app/views/users/list.rhtml2
2 files changed, 7 insertions, 7 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index dc07a8f93..abf5e03d1 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -77,18 +77,18 @@ module ApplicationHelper
def pagination_links_full(paginator, options={}, html_options={})
html = ''
html << link_to_remote(('&#171; ' + l(:label_previous)),
- {:update => "content", :url => { :page => paginator.current.previous }},
- {:href => url_for(:action => 'list', :params =>{:page => paginator.current.previous})}) + ' ' if paginator.current.previous
+ {:update => "content", :url => options.merge(:page => paginator.current.previous)},
+ {:href => url_for(:params => options.merge(:page => paginator.current.previous))}) + ' ' if paginator.current.previous
html << (pagination_links_each(paginator, options) do |n|
link_to_remote(n.to_s,
- {:url => {:action => 'list', :params => {:page => n}}, :update => 'content'},
- {:href => url_for(:action => 'list', :params => {:page => n})})
+ {:url => {:action => 'list', :params => options.merge(:page => n)}, :update => 'content'},
+ {:href => url_for(:params => options.merge(:page => n))})
end || '')
html << ' ' + link_to_remote((l(:label_next) + ' &#187;'),
- {:update => "content", :url => { :page => paginator.current.next }},
- {:href => url_for(:action => 'list', :params => {:page => paginator.current.next})}) if paginator.current.next
+ {:update => "content", :url => options.merge(:page => paginator.current.next)},
+ {:href => url_for(:params => options.merge(:page => paginator.current.next))}) if paginator.current.next
html
end
diff --git a/app/views/users/list.rhtml b/app/views/users/list.rhtml
index 5d6e26d37..2ffbcd6f6 100644
--- a/app/views/users/list.rhtml
+++ b/app/views/users/list.rhtml
@@ -55,6 +55,6 @@
</tbody>
</table>
-<p><%= pagination_links_full @user_pages %>
+<p><%= pagination_links_full @user_pages, :status => @status %>
[ <%= @user_pages.current.first_item %> - <%= @user_pages.current.last_item %> / <%= @user_count %> ]
</p> \ No newline at end of file