2017-08-17 22:00:37 +05:30
|
|
|
- subject = local_assigns.fetch(:subject, current_user)
|
|
|
|
- include_private = local_assigns.fetch(:include_private, false)
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
.nav-links.snippet-scope-menu.mobile-separator.nav.nav-tabs
|
2017-08-17 22:00:37 +05:30
|
|
|
%li{ class: active_when(params[:scope].nil?) }
|
|
|
|
= link_to subject_snippets_path(subject) do
|
2019-02-15 15:39:39 +05:30
|
|
|
= _("All")
|
2018-11-08 19:23:39 +05:30
|
|
|
%span.badge.badge-pill
|
2017-08-17 22:00:37 +05:30
|
|
|
- if include_private
|
2020-03-09 13:42:32 +05:30
|
|
|
= counts[:total]
|
2017-08-17 22:00:37 +05:30
|
|
|
- else
|
2020-03-09 13:42:32 +05:30
|
|
|
= counts[:are_public_or_internal]
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
- if include_private
|
|
|
|
%li{ class: active_when(params[:scope] == "are_private") }
|
|
|
|
= link_to subject_snippets_path(subject, scope: 'are_private') do
|
2019-02-15 15:39:39 +05:30
|
|
|
= _("Private")
|
2018-11-08 19:23:39 +05:30
|
|
|
%span.badge.badge-pill
|
2020-03-09 13:42:32 +05:30
|
|
|
= counts[:are_private]
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
%li{ class: active_when(params[:scope] == "are_internal") }
|
|
|
|
= link_to subject_snippets_path(subject, scope: 'are_internal') do
|
2019-02-15 15:39:39 +05:30
|
|
|
= _("Internal")
|
2018-11-08 19:23:39 +05:30
|
|
|
%span.badge.badge-pill
|
2020-03-09 13:42:32 +05:30
|
|
|
= counts[:are_internal]
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
%li{ class: active_when(params[:scope] == "are_public") }
|
|
|
|
= link_to subject_snippets_path(subject, scope: 'are_public') do
|
2019-02-15 15:39:39 +05:30
|
|
|
= _("Public")
|
2018-11-08 19:23:39 +05:30
|
|
|
%span.badge.badge-pill
|
2020-03-09 13:42:32 +05:30
|
|
|
= counts[:are_public]
|