summaryrefslogtreecommitdiff
path: root/app/views/groups/labels/index.html.haml
diff options
context:
space:
mode:
authorLuke Bennett <lukeeeebennettplus@gmail.com>2018-05-17 16:14:17 +0100
committerLuke Bennett <lukeeeebennettplus@gmail.com>2018-05-17 16:14:17 +0100
commit2fd334b86a33cd96c7708980e1f9cd7f8717877a (patch)
tree0ebe85c6ae6d85c035556e9052e308ea20189540 /app/views/groups/labels/index.html.haml
parentbd47118e1b5a814b7660b8b2d808690ca971871e (diff)
downloadgitlab-ce-2fd334b86a33cd96c7708980e1f9cd7f8717877a.tar.gz
Fix group labels list
Diffstat (limited to 'app/views/groups/labels/index.html.haml')
-rw-r--r--app/views/groups/labels/index.html.haml27
1 files changed, 8 insertions, 19 deletions
diff --git a/app/views/groups/labels/index.html.haml b/app/views/groups/labels/index.html.haml
index 1fa6389de0f..44b64a31972 100644
--- a/app/views/groups/labels/index.html.haml
+++ b/app/views/groups/labels/index.html.haml
@@ -2,6 +2,7 @@
- page_title "Labels"
- can_admin_label = can?(current_user, :admin_label, @group)
- hide_class = ''
+- hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1')
- if can_admin_label
- content_for(:header_content) do
@@ -9,7 +10,7 @@
= link_to new_group_label_path(@group), class: "btn btn-new" do
New label
-- if @labels.exists? || @prioritized_labels.exists?
+- if @labels.exists?
#promote-label-modal
%div{ class: container_class }
.top-area.adjust
@@ -19,24 +20,12 @@
Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging.
.labels-container.prepend-top-5
- - if can_admin_label
- -# Only show it in the first page
- - hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1')
- .prioritized-labels{ class: ('hide' if hide) }
- %h5.prepend-top-0 Prioritized Labels
- %ul.content-list.manage-labels-list.js-prioritized-labels
- #js-priority-labels-empty-state.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: @group, collection: @prioritized_labels, as: :label
-
- - if @labels.present?
- .other-labels
- - if can_admin_label
- %h5{ class: ('hide' if hide) } Other Labels
- %ul.content-list.manage-labels-list.js-other-labels
- = render partial: 'shared/label', subject: @group, collection: @labels, as: :label
- = paginate @labels, theme: 'gitlab'
+ .other-labels
+ - if can_admin_label
+ %h5{ class: ('hide' if hide) } Labels
+ %ul.content-list.manage-labels-list.js-other-labels
+ = render partial: 'shared/label', subject: @group, collection: @labels, as: :label
+ = paginate @labels, theme: 'gitlab'
- else
= render 'shared/empty_states/labels'