dry up the use of the user search tab

This commit is contained in:
Alexis Reigel 2018-08-15 14:03:55 +02:00
parent 65df88c490
commit a52d1dbb0f
No known key found for this signature in database
GPG Key ID: 55ADA7C7B683B329
1 changed files with 10 additions and 12 deletions

View File

@ -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