summaryrefslogtreecommitdiff
path: root/app/views/projects/labels/index.html.haml
blob: 77c42ec356ddf2bb5a48c1df351ed72ab0b35abb (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
- page_title "Labels"

.top-area
  .nav-text
    Labels can be applied to issues and merge requests.
  .nav-controls
    - if can? current_user, :admin_label, @project
      = link_to new_namespace_project_label_path(@project.namespace, @project), class: "btn btn-new" do
        = icon('plus')
        New label

.labels
  - hide_class = 'hide' if ((params[:page].present? and params[:page] != '1') or @labels.blank?)
  .prioritized-labels{ class: hide_class }
    %h5 Prioritized Label
    %ul.content-list.manage-labels-list.js-prioritized-labels{ "data-url" => set_sorting_namespace_project_labels_path(@project.namespace, @project) }
      - if @prioritized_labels.present?
        = render @prioritized_labels
      - else
        %p.empty-message No prioritized labels yet
  .other-labels
    %h5{ class: hide_class } Other Labels
    - if @labels.present?
      %ul.content-list.manage-labels-list.js-other-labels
        = render @labels
      = paginate @labels, theme: 'gitlab'
    - else
      .nothing-here-block
        - if can? current_user, :admin_label, @project
          Create a label or #{link_to 'generate a default set of labels', generate_namespace_project_labels_path(@project.namespace, @project), method: :post}.
        - else
          No labels created