Fixed pagination on users/list (status filter lost)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@409 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
2db9bdf7a2
commit
1c0971b12c
@ -77,18 +77,18 @@ module ApplicationHelper
|
|||||||
def pagination_links_full(paginator, options={}, html_options={})
|
def pagination_links_full(paginator, options={}, html_options={})
|
||||||
html = ''
|
html = ''
|
||||||
html << link_to_remote(('« ' + l(:label_previous)),
|
html << link_to_remote(('« ' + l(:label_previous)),
|
||||||
{:update => "content", :url => { :page => paginator.current.previous }},
|
{:update => "content", :url => options.merge(:page => paginator.current.previous)},
|
||||||
{:href => url_for(:action => 'list', :params =>{:page => paginator.current.previous})}) + ' ' if 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|
|
html << (pagination_links_each(paginator, options) do |n|
|
||||||
link_to_remote(n.to_s,
|
link_to_remote(n.to_s,
|
||||||
{:url => {:action => 'list', :params => {:page => n}}, :update => 'content'},
|
{:url => {:action => 'list', :params => options.merge(:page => n)}, :update => 'content'},
|
||||||
{:href => url_for(:action => 'list', :params => {:page => n})})
|
{:href => url_for(:params => options.merge(:page => n))})
|
||||||
end || '')
|
end || '')
|
||||||
|
|
||||||
html << ' ' + link_to_remote((l(:label_next) + ' »'),
|
html << ' ' + link_to_remote((l(:label_next) + ' »'),
|
||||||
{:update => "content", :url => { :page => paginator.current.next }},
|
{:update => "content", :url => options.merge(:page => paginator.current.next)},
|
||||||
{:href => url_for(:action => 'list', :params => {:page => paginator.current.next})}) if paginator.current.next
|
{:href => url_for(:params => options.merge(:page => paginator.current.next))}) if paginator.current.next
|
||||||
html
|
html
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -55,6 +55,6 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</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 %> ]
|
[ <%= @user_pages.current.first_item %> - <%= @user_pages.current.last_item %> / <%= @user_count %> ]
|
||||||
</p>
|
</p>
|
Loading…
x
Reference in New Issue
Block a user