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

22 lines
869 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
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?
= 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