debian-mirror-gitlab/app/views/kaminari/gitlab/_paginator.html.haml

23 lines
840 B
Text
Raw Normal View History

2014-09-02 18:07:02 +05:30
-# The container tag
-# available local variables
-# current_page: a page object for the currently displayed page
-# 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
%div.gl-pagination
2015-09-25 12:07:36 +05:30
%ul.pagination.clearfix
2015-10-24 18:46:33 +05:30
- unless current_page.first?
= 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?
= last_page_tag unless total_pages < 5
2015-10-24 18:46:33 +05:30