summaryrefslogtreecommitdiff
path: root/app/views/explore
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/explore
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/explore')
-rw-r--r--app/views/explore/projects/_filter.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/explore/projects/_filter.html.haml b/app/views/explore/projects/_filter.html.haml
index e3088848492..56f463572bb 100644
--- a/app/views/explore/projects/_filter.html.haml
+++ b/app/views/explore/projects/_filter.html.haml
@@ -13,7 +13,7 @@
= link_to filter_projects_path(visibility_level: nil) do
Any
- Gitlab::VisibilityLevel.values.each do |level|
- %li{ class: (level.to_s == params[:visibility_level]) ? 'active' : 'light' }
+ %li{ class: active_when(level.to_s == params[:visibility_level]) || 'light' }
= link_to filter_projects_path(visibility_level: level) do
= visibility_level_icon(level)
= visibility_level_label(level)
@@ -34,7 +34,7 @@
Any
- @tags.each do |tag|
- %li{ class: (tag.name == params[:tag]) ? 'active' : 'light' }
+ %li{ class: active_when(tag.name == params[:tag]) || 'light' }
= link_to filter_projects_path(tag: tag.name) do
= icon('tag')
= tag.name