2016-06-10 09:17:28 -04:00
- @no_container = true
2015-04-30 13:06:18 -04:00
- page_title "Labels"
2016-06-03 02:36:09 -04:00
- hide_class = ''
2016-06-10 09:17:28 -04:00
= render "projects/issues/head"
2015-09-14 14:08:35 -04:00
2016-06-30 09:01:26 -04:00
%div{ class: container_class }
2016-06-14 12:48:42 -04:00
.top-area.adjust
2016-06-10 09:17:28 -04:00
.nav-text
2016-06-14 12:48:42 -04:00
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-10 09:17:28 -04:00
.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-07-30 06:27:29 -04:00
2016-06-10 09:17:28 -04:00
.labels
2016-09-29 00:03:28 -04:00
- if can?(current_user, :admin_label, @project)
2016-06-10 09:17:28 -04:00
-# Only show it in the first page
2016-10-10 21:30:18 -04:00
- hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1')
2016-09-29 00:03:28 -04:00
.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) }
%p.empty-message{ class: ('hidden' unless @prioritized_labels.empty?) } No prioritized labels yet
- if @prioritized_labels.present?
2016-10-27 22:43:31 -04:00
= render partial: 'shared/label', subject: @project, collection: @prioritized_labels, as: :label
2016-09-19 23:09:57 -04:00
2016-09-29 00:03:28 -04:00
.other-labels
- if can?(current_user, :admin_label, @project)
%h5{ class: ('hide' if hide) } Other Labels
%ul.content-list.manage-labels-list.js-other-labels
- if @labels.present?
2016-10-27 22:43:31 -04:00
= render partial: 'shared/label', subject: @project, collection: @labels, as: :label
2016-09-29 00:03:28 -04:00
= paginate @labels, theme: 'gitlab'
- if @labels.blank?
.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