BigW Consortium Gitlab

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

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
    - if can?(current_user, :admin_label, @project)
18 19 20 21 22
      -# Only show it in the first page
      - hide = @project.labels.empty? || (params[:page].present? && params[:page] != '1')
      .prioritized-labels{ class: ('hide' if hide) }
        %h5 Prioritized Labels
        %ul.content-list.manage-labels-list.js-prioritized-labels{ "data-url" => set_priorities_namespace_project_labels_path(@project.namespace, @project) }
23
          %p.empty-message{ class: ('hidden' unless @prioritized_labels.empty?) } No prioritized labels yet
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
          - if @prioritized_labels.present?
            = render @prioritized_labels
    .other-labels
      - if can?(current_user, :admin_label, @project)
        %h5{ class: ('hide' if hide) } 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