2011-02-11 07:53:41 +00:00
|
|
|
-# The container tag
|
|
|
|
- available local variables
|
2011-02-27 15:17:09 +00:00
|
|
|
current_page: a page object for the currently displayed page
|
2011-02-11 07:53:41 +00:00
|
|
|
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
|
2011-02-15 21:48:35 +00:00
|
|
|
%nav.pagination
|
2011-04-16 12:46:13 +00:00
|
|
|
= first_page_tag unless current_page.first?
|
|
|
|
= prev_page_tag unless current_page.first?
|
2011-02-15 21:48:35 +00:00
|
|
|
- each_page do |page|
|
2011-02-25 01:35:21 +00:00
|
|
|
- if page.left_outer? || page.right_outer? || page.inside_window?
|
|
|
|
= page_tag page
|
2011-02-15 21:48:35 +00:00
|
|
|
- elsif !page.was_truncated?
|
2011-02-25 03:04:59 +00:00
|
|
|
= gap_tag
|
2011-04-16 12:46:13 +00:00
|
|
|
= next_page_tag unless current_page.last?
|
|
|
|
= last_page_tag unless current_page.last?
|