debian-mirror-gitlab/app/views/projects/labels/index.html.haml

40 lines
1.7 KiB
Text
Raw Normal View History

- @no_container = true
2015-09-11 14:41:01 +05:30
- page_title "Labels"
- hide_class = ''
2017-09-10 17:25:29 +05:30
- can_admin_label = can?(current_user, :admin_label, @project)
2017-08-17 22:00:37 +05:30
- if @labels.exists? || @prioritized_labels.exists?
%div{ class: container_class }
.top-area.adjust
.nav-text
2017-09-10 17:25:29 +05:30
Labels can be applied to issues and merge requests.
- if can_admin_label
Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging.
2016-06-22 15:30:34 +05:30
2017-09-10 17:25:29 +05:30
- if can_admin_label
2018-03-17 18:26:18 +05:30
.nav-controls
2017-09-10 17:25:29 +05:30
= link_to new_project_label_path(@project), class: "btn btn-new" do
2017-08-17 22:00:37 +05:30
New label
2016-11-03 12:29:30 +05:30
2017-08-17 22:00:37 +05:30
.labels
2017-09-10 17:25:29 +05:30
- if can_admin_label
2017-08-17 22:00:37 +05:30
-# Only show it in the first page
- hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1')
.prioritized-labels{ class: ('hide' if hide) }
%h5 Prioritized Labels
2017-09-10 17:25:29 +05:30
%ul.content-list.manage-labels-list.js-prioritized-labels{ "data-url" => set_priorities_project_labels_path(@project) }
2017-08-17 22:00:37 +05:30
#js-priority-labels-empty-state{ class: "#{'hidden' unless @prioritized_labels.empty?}" }
= render 'shared/empty_states/priority_labels'
- if @prioritized_labels.present?
= render partial: 'shared/label', subject: @project, collection: @prioritized_labels, as: :label
- if @labels.present?
.other-labels
2017-09-10 17:25:29 +05:30
- if can_admin_label
2017-08-17 22:00:37 +05:30
%h5{ class: ('hide' if hide) } Other Labels
%ul.content-list.manage-labels-list.js-other-labels
= render partial: 'shared/label', subject: @project, collection: @labels, as: :label
= paginate @labels, theme: 'gitlab'
- else
= render 'shared/empty_states/labels'