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
|
2020-02-05 04:08:43 -05:00
|
|
|
= counts[:total]
|
2016-12-09 16:38:10 -05:00
|
|
|
- else
|
2020-02-05 04:08:43 -05:00
|
|
|
= counts[:are_public_or_internal]
|
2016-12-09 16:38:10 -05:00
|
|
|
|
|
|
|
- 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
|
2020-02-05 04:08:43 -05:00
|
|
|
= counts[:are_private]
|
2016-12-09 16:38:10 -05:00
|
|
|
|
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
|
2020-02-05 04:08:43 -05:00
|
|
|
= counts[:are_internal]
|
2016-12-09 16:38:10 -05:00
|
|
|
|
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
|
2020-02-05 04:08:43 -05:00
|
|
|
= counts[:are_public]
|