summaryrefslogtreecommitdiff
path: root/app/views/kaminari
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 18:25:58 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 18:25:58 +0000
commita5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch)
treefb69158581673816a8cd895f9d352dcb3c678b1e /app/views/kaminari
parentd16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff)
downloadgitlab-ce-a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4.tar.gz
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'app/views/kaminari')
-rw-r--r--app/views/kaminari/gitlab/_keyset_paginator.html.haml30
1 files changed, 30 insertions, 0 deletions
diff --git a/app/views/kaminari/gitlab/_keyset_paginator.html.haml b/app/views/kaminari/gitlab/_keyset_paginator.html.haml
new file mode 100644
index 00000000000..f64c70dadfc
--- /dev/null
+++ b/app/views/kaminari/gitlab/_keyset_paginator.html.haml
@@ -0,0 +1,30 @@
+- previous_path = url_for(page_params.merge(cursor: paginator.cursor_for_previous_page))
+- next_path = url_for(page_params.merge(cursor: paginator.cursor_for_next_page))
+
+.gl-pagination.gl-mt-3
+ %ul.pagination.justify-content-center
+
+ - if paginator.has_previous_page?
+ - unless without_first_and_last_pages
+ %li.page-item
+ - first_page_path = url_for(page_params.merge(cursor: paginator.cursor_for_first_page))
+ = link_to first_page_path, rel: 'first', class: 'page-link' do
+ = sprite_icon('angle-double-left', size: 8)
+ = s_('Pagination|First')
+
+ %li.page-item.prev
+ = link_to previous_path, rel: 'prev', class: 'page-link' do
+ = sprite_icon('angle-left', size: 8)
+ = s_('Pagination|Prev')
+
+ - if paginator.has_next_page?
+ %li.page-item.next
+ = link_to next_path, rel: 'next', class: 'page-link' do
+ = s_('Pagination|Next')
+ = sprite_icon('angle-right', size: 8)
+ - unless without_first_and_last_pages
+ %li.page-item
+ - last_page_path = url_for(page_params.merge(cursor: paginator.cursor_for_last_page))
+ = link_to last_page_path, rel: 'last', class: 'page-link' do
+ = s_('Pagination|Last')
+ = sprite_icon('angle-double-right', size: 8)