Replace will_paginate with kaminari. Fixed foodcoop/users page.
This commit is contained in:
parent
1708df3f6c
commit
ab81ef09d5
17 changed files with 162 additions and 64 deletions
11
app/views/kaminari/_page.html.haml
Normal file
11
app/views/kaminari/_page.html.haml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
-#
|
||||
Link showing page number
|
||||
- available local variables
|
||||
page: a page object for "this" page
|
||||
url: url to this page
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
%li{:class=>"page #{' active' if page.current? }"}
|
||||
= link_to page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
|
||||
Loading…
Add table
Add a link
Reference in a new issue