2016-12-09 16:38:10 -05:00
|
|
|
- subject = local_assigns.fetch(:subject, current_user)
|
|
|
|
- include_private = local_assigns.fetch(:include_private, false)
|
|
|
|
|
2018-04-19 23:34:20 -04:00
|
|
|
.nav-links.snippet-scope-menu.mobile-separator.nav.nav-tabs
|
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
|
2018-11-26 09:29:40 -05:00
|
|
|
= _("All")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2016-12-09 16:38:10 -05:00
|
|
|
- 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
|
2018-11-26 09:29:40 -05:00
|
|
|
= _("Private")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2016-12-09 16:38:10 -05:00
|
|
|
= 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
|
2018-11-26 09:29:40 -05:00
|
|
|
= _("Internal")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2016-12-09 16:38:10 -05:00
|
|
|
= 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
|
2018-11-26 09:29:40 -05:00
|
|
|
= _("Public")
|
2018-04-09 12:33:41 -04:00
|
|
|
%span.badge.badge-pill
|
2016-12-09 16:38:10 -05:00
|
|
|
= subject.snippets.are_public.count
|