2011-02-11 16:53:41 +09:00
|
|
|
-# The container tag
|
2011-04-28 00:36:14 +09:00
|
|
|
-# available local variables
|
|
|
|
-# current_page: a page object for the currently displayed page
|
2012-05-25 15:31:53 +09:00
|
|
|
-# total_pages: total number of pages
|
2011-04-28 00:36:14 +09:00
|
|
|
-# per_page: number of items to fetch per page
|
|
|
|
-# remote: data-remote
|
|
|
|
-# paginator: the paginator that renders the pagination tags inside
|
2011-02-17 00:46:34 +09:00
|
|
|
= paginator.render do
|
2011-02-16 06:48:35 +09:00
|
|
|
%nav.pagination
|
2011-04-16 21:46:13 +09:00
|
|
|
= first_page_tag unless current_page.first?
|
|
|
|
= prev_page_tag unless current_page.first?
|
2011-02-16 06:48:35 +09:00
|
|
|
- each_page do |page|
|
2011-02-25 10:35:21 +09:00
|
|
|
- if page.left_outer? || page.right_outer? || page.inside_window?
|
|
|
|
= page_tag page
|
2011-02-16 06:48:35 +09:00
|
|
|
- elsif !page.was_truncated?
|
2011-02-25 12:04:59 +09:00
|
|
|
= gap_tag
|
2011-04-16 21:46:13 +09:00
|
|
|
= next_page_tag unless current_page.last?
|
|
|
|
= last_page_tag unless current_page.last?
|