summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Reigel <alexis.reigel.ext@siemens.com>2018-08-15 14:03:55 +0200
committerAlexis Reigel <alexis.reigel.ext@siemens.com>2019-03-14 18:16:03 +0100
commita52d1dbb0f7a32964ee86977cec5236cce027a93 (patch)
tree2c406310fd3afc5e4224396156c83b81bb971bc7
parent65df88c4907195ea789bd5b35ddde1305b7c199a (diff)
downloadgitlab-ce-a52d1dbb0f7a32964ee86977cec5236cce027a93.tar.gz
dry up the use of the user search tab
-rw-r--r--app/views/search/_category.html.haml22
1 files changed, 10 insertions, 12 deletions
diff --git a/app/views/search/_category.html.haml b/app/views/search/_category.html.haml
index e9fdf3dbbc1..19d7d13512d 100644
--- a/app/views/search/_category.html.haml
+++ b/app/views/search/_category.html.haml
@@ -1,3 +1,11 @@
+- users = capture_haml do
+ - if can?(current_user, :read_users_list)
+ %li{ class: active_when(@scope == 'users') }
+ = link_to search_filter_path(scope: 'users') do
+ Users
+ %span.badge.badge-pill
+ = limited_count(@search_results.limited_users_count)
+
.scrolling-tabs-container.inner-page-scroll-tabs.is-smaller
.fade-left= icon('angle-left')
.fade-right= icon('angle-right')
@@ -45,12 +53,7 @@
= _("Commits")
%span.badge.badge-pill
= @search_results.commits_count
- - if can?(current_user, :read_users_list)
- %li{ class: active_when(@scope == 'users') }
- = link_to search_filter_path(scope: 'users') do
- Users
- %span.badge.badge-pill
- = limited_count(@search_results.limited_users_count)
+ = users
- elsif @show_snippets
%li{ class: active_when(@scope == 'snippet_blobs') }
@@ -84,9 +87,4 @@
= _("Milestones")
%span.badge.badge-pill
= limited_count(@search_results.limited_milestones_count)
- - if can?(current_user, :read_users_list)
- %li{ class: active_when(@scope == 'users') }
- = link_to search_filter_path(scope: 'users') do
- Users
- %span.badge.badge-pill
- = limited_count(@search_results.limited_users_count)
+ = users