##// END OF EJS Templates
Fixed pagination on users/list (status filter lost)...
Jean-Philippe Lang -
r406:1c0971b12c60
parent child
Show More
@@ -77,18 +77,18 module ApplicationHelper
77 def pagination_links_full(paginator, options={}, html_options={})
77 def pagination_links_full(paginator, options={}, html_options={})
78 html = ''
78 html = ''
79 html << link_to_remote(('&#171; ' + l(:label_previous)),
79 html << link_to_remote(('&#171; ' + l(:label_previous)),
80 {:update => "content", :url => { :page => paginator.current.previous }},
80 {:update => "content", :url => options.merge(:page => paginator.current.previous)},
81 {:href => url_for(:action => 'list', :params =>{:page => paginator.current.previous})}) + ' ' if paginator.current.previous
81 {:href => url_for(:params => options.merge(:page => paginator.current.previous))}) + ' ' if paginator.current.previous
82
82
83 html << (pagination_links_each(paginator, options) do |n|
83 html << (pagination_links_each(paginator, options) do |n|
84 link_to_remote(n.to_s,
84 link_to_remote(n.to_s,
85 {:url => {:action => 'list', :params => {:page => n}}, :update => 'content'},
85 {:url => {:action => 'list', :params => options.merge(:page => n)}, :update => 'content'},
86 {:href => url_for(:action => 'list', :params => {:page => n})})
86 {:href => url_for(:params => options.merge(:page => n))})
87 end || '')
87 end || '')
88
88
89 html << ' ' + link_to_remote((l(:label_next) + ' &#187;'),
89 html << ' ' + link_to_remote((l(:label_next) + ' &#187;'),
90 {:update => "content", :url => { :page => paginator.current.next }},
90 {:update => "content", :url => options.merge(:page => paginator.current.next)},
91 {:href => url_for(:action => 'list', :params => {:page => paginator.current.next})}) if paginator.current.next
91 {:href => url_for(:params => options.merge(:page => paginator.current.next))}) if paginator.current.next
92 html
92 html
93 end
93 end
94
94
@@ -55,6 +55,6
55 </tbody>
55 </tbody>
56 </table>
56 </table>
57
57
58 <p><%= pagination_links_full @user_pages %>
58 <p><%= pagination_links_full @user_pages, :status => @status %>
59 [ <%= @user_pages.current.first_item %> - <%= @user_pages.current.last_item %> / <%= @user_count %> ]
59 [ <%= @user_pages.current.first_item %> - <%= @user_pages.current.last_item %> / <%= @user_count %> ]
60 </p> No newline at end of file
60 </p>
General Comments 0
You need to be logged in to leave comments. Login now