index.html.haml 2.23 KB
Newer Older
1
- @no_container = true
2
- page_title "Labels"
3
- hide_class = ''
4
= render "projects/issues/head"
5

Valery Sizov's avatar
Valery Sizov committed
6
%div{ class: container_class }
7
  .top-area.adjust
8
    .nav-text
9 10
      Labels can be applied to issues and merge requests. Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging.

11 12 13 14
    .nav-controls
      - if can?(current_user, :admin_label, @project)
        = link_to new_namespace_project_label_path(@project.namespace, @project), class: "btn btn-new" do
          New label
15

16
  .labels
17
    - unless @labels.empty?
18
      -# Only show it in the first page
19
      - hide = params[:page].present? && params[:page] != '1'
20
      - if can?(current_user, :admin_label, @project)
21
        .prioritized-labels{ class: ('hidden' if hide) }
22 23 24 25
          %h5 Prioritized Labels
          %ul.content-list.manage-labels-list.js-prioritized-labels{ "data-url" => set_priorities_namespace_project_labels_path(@project.namespace, @project) }
            %p.empty-message{ class: ('hidden' unless @prioritized_labels.empty?) } No prioritized labels yet
            - if @prioritized_labels.present?
26
              = render partial: 'shared/label', collection: @prioritized_labels, as: :label
27

28
      .group-labels{ class: ('hidden' if hide || @project.group.blank? || @group_labels.empty?) }
29 30 31 32 33
        %h5
          = icon('folder-open')
          Group Labels
        %ul.content-list.manage-labels-list.js-group-labels
          - if @group_labels.present?
34
            = render partial: 'shared/label', collection: @group_labels, as: :label
35

36 37
      .project-labels{ class: ('hidden' if @project_labels.empty?) }
        %h5{ class: ('hidden' if hide) }
38 39 40
          = icon('bookmark')
          Project Labels
        %ul.content-list.manage-labels-list.js-project-labels
41
          - if @project_labels.present?
42
            = render partial: 'shared/label', collection: @project_labels, as: :label
43
            = paginate @project_labels, theme: 'gitlab'
44 45 46 47 48 49
    - 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 yet.