From 2fd334b86a33cd96c7708980e1f9cd7f8717877a Mon Sep 17 00:00:00 2001 From: Luke Bennett Date: Thu, 17 May 2018 16:14:17 +0100 Subject: Fix group labels list --- app/views/groups/labels/index.html.haml | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'app/views/groups/labels/index.html.haml') 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' -- cgit v1.2.1