debian-mirror-gitlab/app/views/shared/labels/_nav.html.haml
2021-12-11 22:18:48 +05:30

20 lines
1.2 KiB
Text

- subscribed = params[:subscribed]
.top-area.adjust
= gl_tabs_nav({ class: 'gl-flex-grow-1 gl-border-0' }) do
= gl_tab_link_to _('All'), labels_filter_path, { item_active: subscribed != 'true' }
- if current_user
= gl_tab_link_to _('Subscribed'), labels_filter_path(subscribed: 'true'), { item_active: subscribed == 'true' }
.nav-controls
= form_tag labels_filter_path, method: :get do
= hidden_field_tag :subscribed, params[:subscribed]
.input-group
= search_field_tag :search, params[:search], { placeholder: _('Filter'), id: 'label-search', class: 'form-control search-text-input input-short', spellcheck: false, autofocus: true }
%span.input-group-append
%button.btn.gl-button.btn-default{ type: "submit", "aria-label" => _('Submit search') }
= sprite_icon('search')
= render 'shared/labels/sort_dropdown'
- if labels_or_filters && can_admin_label && @project
= link_to _('New label'), new_project_label_path(@project), class: "btn gl-button btn-confirm qa-label-create-new"
- if labels_or_filters && can_admin_label && @group
= link_to _('New label'), new_group_label_path(@group), class: "btn gl-button btn-confirm qa-label-create-new"