2014-09-02 18:07:02 +05:30
|
|
|
-# The container tag
|
|
|
|
-# available local variables
|
|
|
|
-# current_page: a page object for the currently displayed page
|
2016-06-16 23:09:34 +05:30
|
|
|
-# total_pages: total number of pages
|
2014-09-02 18:07:02 +05:30
|
|
|
-# per_page: number of items to fetch per page
|
|
|
|
-# remote: data-remote
|
|
|
|
-# paginator: the paginator that renders the pagination tags inside
|
|
|
|
= paginator.render do
|
2018-11-08 19:23:39 +05:30
|
|
|
.gl-pagination.prepend-top-default
|
|
|
|
%ul.pagination.justify-content-center
|
2015-10-24 18:46:33 +05:30
|
|
|
- unless current_page.first?
|
2016-06-16 23:09:34 +05:30
|
|
|
= first_page_tag unless total_pages < 5 # As kaminari will always show the first 5 pages
|
2016-04-02 18:10:28 +05:30
|
|
|
= prev_page_tag
|
2014-09-02 18:07:02 +05:30
|
|
|
- each_page do |page|
|
|
|
|
- if page.left_outer? || page.right_outer? || page.inside_window?
|
|
|
|
= page_tag page
|
|
|
|
- elsif !page.was_truncated?
|
|
|
|
= gap_tag
|
2016-04-02 18:10:28 +05:30
|
|
|
= next_page_tag
|
2015-10-24 18:46:33 +05:30
|
|
|
- unless current_page.last?
|
2016-06-16 23:09:34 +05:30
|
|
|
= last_page_tag unless total_pages < 5
|