summaryrefslogtreecommitdiff
path: root/app/views/kaminari/gitlab
diff options
context:
space:
mode:
authorSemyon Pupkov <mail@semyonpupkov.com>2017-02-12 13:02:26 +0500
committerSemyon Pupkov <mail@semyonpupkov.com>2017-02-15 14:29:48 +0500
commit0dfccd995aa9bf560e59299f3a4f1705d6981115 (patch)
treec6ab80041dd2b83ed4c245b0824c2ace70872eb2 /app/views/kaminari/gitlab
parent1452729304393978ec93b712130dff6687db01b9 (diff)
downloadgitlab-ce-0dfccd995aa9bf560e59299f3a4f1705d6981115.tar.gz
Add active_when helper
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24036
Diffstat (limited to 'app/views/kaminari/gitlab')
-rw-r--r--app/views/kaminari/gitlab/_page.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/kaminari/gitlab/_page.html.haml b/app/views/kaminari/gitlab/_page.html.haml
index cefe0066a8f..5c5be03a7cd 100644
--- a/app/views/kaminari/gitlab/_page.html.haml
+++ b/app/views/kaminari/gitlab/_page.html.haml
@@ -6,5 +6,5 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
-%li{ class: "page#{' active' if page.current?}#{' sibling' if page.next? || page.prev?}" }
+%li.page{ class: [active_when(page.current?), ('sibling' if page.next? || page.prev?)] }
= link_to page, url, { remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil }