2016-06-16 23:09:34 +05:30
- @no_container = true
2015-09-11 14:41:01 +05:30
- page_title "Labels"
2016-06-16 23:09:34 +05:30
- hide_class = ''
= render "projects/issues/head"
2015-09-25 12:07:36 +05:30
2016-08-24 12:49:21 +05:30
%div{ class: container_class }
2016-06-22 15:30:34 +05:30
.top-area.adjust
2016-06-16 23:09:34 +05:30
.nav-text
2016-06-22 15:30:34 +05:30
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.
2016-06-16 23:09:34 +05:30
.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
2014-09-02 18:07:02 +05:30
2016-06-16 23:09:34 +05:30
.labels
- if can?(current_user, :admin_label, @project)
-# 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) }
2016-06-22 15:30:34 +05:30
%p.empty-message{ class: ('hidden' unless @prioritized_labels.empty?) } No prioritized labels yet
2016-06-16 23:09:34 +05:30
- 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'
2015-09-11 14:41:01 +05:30
- else
2016-06-16 23:09:34 +05:30
.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