2016-12-09 16:38:10 -05:00
|
|
|
- subject = local_assigns.fetch(:subject, current_user)
|
|
|
|
- include_private = local_assigns.fetch(:include_private, false)
|
|
|
|
|
2018-01-25 16:51:33 -05:00
|
|
|
.nav-links.snippet-scope-menu.mobile-separator
|
2017-02-12 03:02:26 -05:00
|
|
|
%li{ class: active_when(params[:scope].nil?) }
|
2016-12-09 18:33:23 -05:00
|
|
|
= link_to subject_snippets_path(subject) do
|
2016-12-09 16:38:10 -05:00
|
|
|
All
|
|
|
|
%span.badge
|
|
|
|
- if include_private
|
|
|
|
= subject.snippets.count
|
|
|
|
- else
|
|
|
|
= subject.snippets.public_and_internal.count
|
|
|
|
|
|
|
|
- if include_private
|
2017-02-12 03:02:26 -05:00
|
|
|
%li{ class: active_when(params[:scope] == "are_private") }
|
2016-12-09 18:33:23 -05:00
|
|
|
= link_to subject_snippets_path(subject, scope: 'are_private') do
|
2016-12-09 16:38:10 -05:00
|
|
|
Private
|
|
|
|
%span.badge
|
|
|
|
= subject.snippets.are_private.count
|
|
|
|
|
2017-02-12 03:02:26 -05:00
|
|
|
%li{ class: active_when(params[:scope] == "are_internal") }
|
2016-12-09 18:33:23 -05:00
|
|
|
= link_to subject_snippets_path(subject, scope: 'are_internal') do
|
2016-12-09 16:38:10 -05:00
|
|
|
Internal
|
|
|
|
%span.badge
|
|
|
|
= subject.snippets.are_internal.count
|
|
|
|
|
2017-02-12 03:02:26 -05:00
|
|
|
%li{ class: active_when(params[:scope] == "are_public") }
|
2016-12-09 18:33:23 -05:00
|
|
|
= link_to subject_snippets_path(subject, scope: 'are_public') do
|
2016-12-09 16:38:10 -05:00
|
|
|
Public
|
|
|
|
%span.badge
|
|
|
|
= subject.snippets.are_public.count
|