gitlab-org--gitlab-foss/app/views/snippets/_snippets_scope_menu.html.haml
George Tsiolis d87b03796e Improve top area navigation
- Change button group width on mobile to 100%
- Added scrolling container to activity top area secondary navigation
- Added bottom border to top-area nav-links to separate them from nav-controls
2018-02-02 19:07:24 +02:00

31 lines
1.1 KiB
Text

- subject = local_assigns.fetch(:subject, current_user)
- include_private = local_assigns.fetch(:include_private, false)
.nav-links.snippet-scope-menu.mobile-separator
%li{ class: active_when(params[:scope].nil?) }
= link_to subject_snippets_path(subject) do
All
%span.badge
- if include_private
= subject.snippets.count
- else
= subject.snippets.public_and_internal.count
- if include_private
%li{ class: active_when(params[:scope] == "are_private") }
= link_to subject_snippets_path(subject, scope: 'are_private') do
Private
%span.badge
= subject.snippets.are_private.count
%li{ class: active_when(params[:scope] == "are_internal") }
= link_to subject_snippets_path(subject, scope: 'are_internal') do
Internal
%span.badge
= subject.snippets.are_internal.count
%li{ class: active_when(params[:scope] == "are_public") }
= link_to subject_snippets_path(subject, scope: 'are_public') do
Public
%span.badge
= subject.snippets.are_public.count