1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

refs #30 add real first/last page links, and use them by default instead of outer window

* :window, :outer_window, :left, :right will be interpreted similarly to how they were, except the supplied N would be the number of pages you actually get. 0 means disable for the outer windows
* outer windows will be disabled by default in favor of first/last links
* include a "disabled" class when appropriate, and always include the label text (but no link tag when current page). Users that want these tags to disappear completely when inapplicable can style them to display: none. (Similarly for "first" and "last".)
* changed the default labels - double angle quotes for "first" and "last", single angle quotes for "previous" and "next". (Consider a standard set of video or audio transport controls: << < stop > >>)
This commit is contained in:
Akira Matsuda 2011-02-25 12:04:59 +09:00
parent 4beef97cea
commit 393943a50e
21 changed files with 105 additions and 109 deletions

View file

@ -0,0 +1,9 @@
-# Link to the "First" page
- available local variables
url: url to the first page
current_page: the page number of currently displayed page
num_pages: total number of pages
per_page: number of items to fetch per page
remote: data-remote
%span{:class => "first#{' disabled' if current_page == 1}"}
= link_to_unless current_page == 1, raw(t 'views.pagination.first'), url, :class => 'prev', :rel => 'prev', :remote => remote