debian-mirror-gitlab/app/views/shared/labels/_nav.html.haml

22 lines
1.4 KiB
Text
Raw Normal View History

2018-12-05 23:21:45 +05:30
- subscribed = params[:subscribed]
.top-area.adjust
2021-12-11 22:18:48 +05:30
= gl_tabs_nav({ class: 'gl-flex-grow-1 gl-border-0' }) do
= gl_tab_link_to _('All'), labels_filter_path, { item_active: subscribed != 'true' }
2018-12-05 23:21:45 +05:30
- if current_user
2021-12-11 22:18:48 +05:30
= gl_tab_link_to _('Subscribed'), labels_filter_path(subscribed: 'true'), { item_active: subscribed == 'true' }
2018-12-05 23:21:45 +05:30
.nav-controls
= form_tag labels_filter_path, method: :get do
= hidden_field_tag :subscribed, params[:subscribed]
.input-group
2020-01-01 13:55:28 +05:30
= search_field_tag :search, params[:search], { placeholder: _('Filter'), id: 'label-search', class: 'form-control search-text-input input-short', spellcheck: false, autofocus: true }
2018-12-05 23:21:45 +05:30
%span.input-group-append
2022-07-23 23:45:48 +05:30
= render Pajamas::ButtonComponent.new(icon: 'search', button_options: { type: "submit", "aria-label" => _('Submit search') })
2018-12-05 23:21:45 +05:30
= render 'shared/labels/sort_dropdown'
2019-03-02 22:35:43 +05:30
- if labels_or_filters && can_admin_label && @project
2022-08-27 11:52:29 +05:30
= render Pajamas::ButtonComponent.new(variant: :confirm, href: new_project_label_path(@project), button_options: { data: { qa_selector: 'create_new_label_button' } }) do
2022-07-23 23:45:48 +05:30
= _('New label')
2019-03-02 22:35:43 +05:30
- if labels_or_filters && can_admin_label && @group
2022-08-27 11:52:29 +05:30
= render Pajamas::ButtonComponent.new(variant: :confirm, href: new_group_label_path(@group), button_options: { data: { qa_selector: 'create_new_label_button' } }) do
2022-07-23 23:45:48 +05:30
= _('New label')