2018-11-08 19:23:39 +05:30
|
|
|
- @no_container = true
|
|
|
|
- page_title "Labels"
|
|
|
|
- can_admin_label = can?(current_user, :admin_label, @group)
|
2018-03-27 19:54:05 +05:30
|
|
|
- issuables = ['issues', 'merge requests']
|
2018-11-20 20:47:30 +05:30
|
|
|
- search = params[:search]
|
2018-12-05 23:21:45 +05:30
|
|
|
- subscribed = params[:subscribed]
|
|
|
|
- labels_or_filters = @labels.exists? || search.present? || subscribed.present?
|
2018-03-27 19:54:05 +05:30
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
- if @labels.present? && can_admin_label
|
2018-11-08 19:23:39 +05:30
|
|
|
- content_for(:header_content) do
|
|
|
|
.nav-controls
|
2018-12-05 23:21:45 +05:30
|
|
|
= link_to _('New label'), new_group_label_path(@group), class: "btn btn-success"
|
2018-11-08 19:23:39 +05:30
|
|
|
|
2018-12-05 23:21:45 +05:30
|
|
|
- if labels_or_filters
|
2018-11-08 19:23:39 +05:30
|
|
|
#promote-label-modal
|
|
|
|
%div{ class: container_class }
|
2018-12-05 23:21:45 +05:30
|
|
|
= render 'shared/labels/nav'
|
2016-11-03 12:29:30 +05:30
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
.labels-container.prepend-top-5
|
2018-11-20 20:47:30 +05:30
|
|
|
- if @labels.any?
|
2018-12-05 23:21:45 +05:30
|
|
|
.text-muted
|
|
|
|
= _('Labels can be applied to %{features}. Group labels are available for any project within the group.') % { features: issuables.to_sentence }
|
2018-11-20 20:47:30 +05:30
|
|
|
.other-labels
|
|
|
|
%h5= _('Labels')
|
|
|
|
%ul.content-list.manage-labels-list.js-other-labels
|
|
|
|
= render partial: 'shared/label', subject: @group, collection: @labels, as: :label, locals: { use_label_priority: false }
|
|
|
|
= paginate @labels, theme: 'gitlab'
|
|
|
|
- elsif search.present?
|
|
|
|
.nothing-here-block
|
|
|
|
= _('No labels with such name or description')
|
2018-12-05 23:21:45 +05:30
|
|
|
- elsif subscribed.present?
|
|
|
|
.nothing-here-block
|
|
|
|
= _('You do not have any subscriptions yet')
|
2018-11-08 19:23:39 +05:30
|
|
|
- else
|
|
|
|
= render 'shared/empty_states/labels'
|
2016-11-03 12:29:30 +05:30
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
%template#js-badge-item-template
|
|
|
|
%li.label-link-item.js-priority-badge.inline.prepend-left-10
|
|
|
|
.label-badge.label-badge-blue= _('Prioritized label')
|