debian-mirror-gitlab/app/views/snippets/_snippets_scope_menu.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
922 B
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- subject = local_assigns.fetch(:subject, current_user)
- include_private = local_assigns.fetch(:include_private, false)
2022-01-26 12:08:38 +05:30
- params[:scope] ||= []
2017-08-17 22:00:37 +05:30
2022-01-26 12:08:38 +05:30
= gl_tabs_nav({ class: 'js-snippets-nav-tabs gl-border-b-0 gl-overflow-x-auto gl-flex-grow-1 gl-flex-nowrap' }) do
= gl_tab_link_to subject_snippets_path(subject), { item_active: params[:scope].empty? } do
= _('All')
= gl_tab_counter_badge(include_private ? counts[:total] : counts[:are_public_or_internal])
2017-08-17 22:00:37 +05:30
- if include_private
2022-01-26 12:08:38 +05:30
= gl_tab_link_to subject_snippets_path(subject, scope: 'are_private') do
= _('Private')
= gl_tab_counter_badge(counts[:are_private])
= gl_tab_link_to subject_snippets_path(subject, scope: 'are_internal') do
= _('Internal')
= gl_tab_counter_badge(counts[:are_internal])
= gl_tab_link_to subject_snippets_path(subject, scope: 'are_public') do
= _('Public')
= gl_tab_counter_badge(counts[:are_public])