kaminari--kaminari/app/views/kaminari/_paginator.html.haml

17 lines
657 B
Plaintext
Raw Normal View History

-# The container tag
- available local variables
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
2011-02-16 14:24:31 +00:00
paginator: the paginator that renders the pagination tags inside
2011-02-16 15:46:34 +00:00
= paginator.render do
%nav.pagination
= current_page > 1 ? prev_link_tag : prev_span_tag
- each_page do |page|
- if page.left_outer? || page.right_outer? || page.inside_window?
= page_tag page
- elsif !page.was_truncated?
= truncated_span_tag
= num_pages > current_page ? next_link_tag : next_span_tag