summaryrefslogtreecommitdiff
path: root/app/views/groups/labels/index.html.haml
blob: 5b78ce910b889c27249bae3a31b7ef6066a9ff5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
- @no_container = true
- page_title "Labels"
- can_admin_label = can?(current_user, :admin_label, @group)
- issuables = ['issues', 'merge requests']
- search = params[:search]
- subscribed = params[:subscribed]
- labels_or_filters = @labels.exists? || search.present? || subscribed.present?

- if can_admin_label
  - content_for(:header_content) do
    .nav-controls
      = link_to _('New label'), new_group_label_path(@group), class: "btn btn-success"

- if labels_or_filters
  #promote-label-modal
  %div{ class: container_class }
    = render 'shared/labels/nav'

    .labels-container.prepend-top-5
      - if @labels.any?
        .text-muted
          = _('Labels can be applied to %{features}. Group labels are available for any project within the group.') % { features: issuables.to_sentence }
        .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')
      - elsif subscribed.present?
        .nothing-here-block
          = _('You do not have any subscriptions yet')
- else
  = render 'shared/empty_states/labels'

%template#js-badge-item-template
  %li.label-link-item.js-priority-badge.inline.prepend-left-10
    .label-badge.label-badge-blue= _('Prioritized label')