Commit f9099b17 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch 'fix/56558-move-primary-button' into 'master'

fix(labels): Move the primary button out of breadcrumbs and into the project section

Closes #56558

See merge request gitlab-org/gitlab-ce!24516
parents 30c141c9 fe823be9
...@@ -6,15 +6,10 @@ ...@@ -6,15 +6,10 @@
- subscribed = params[:subscribed] - subscribed = params[:subscribed]
- labels_or_filters = @labels.exists? || search.present? || subscribed.present? - labels_or_filters = @labels.exists? || search.present? || subscribed.present?
- if @labels.present? && can_admin_label
- content_for(:header_content) do
.nav-controls
= link_to _('New label'), new_group_label_path(@group), class: "btn btn-success"
- if labels_or_filters - if labels_or_filters
#promote-label-modal #promote-label-modal
%div{ class: container_class } %div{ class: container_class }
= render 'shared/labels/nav' = render 'shared/labels/nav', labels_or_filters: labels_or_filters, can_admin_label: can_admin_label
.labels-container.prepend-top-5 .labels-container.prepend-top-5
- if @labels.any? - if @labels.any?
......
...@@ -5,15 +5,10 @@ ...@@ -5,15 +5,10 @@
- subscribed = params[:subscribed] - subscribed = params[:subscribed]
- labels_or_filters = @labels.exists? || @prioritized_labels.exists? || search.present? || subscribed.present? - labels_or_filters = @labels.exists? || @prioritized_labels.exists? || search.present? || subscribed.present?
- if labels_or_filters && can_admin_label
- content_for(:header_content) do
.nav-controls
= link_to _('New label'), new_project_label_path(@project), class: "btn btn-success qa-label-create-new"
- if labels_or_filters - if labels_or_filters
#promote-label-modal #promote-label-modal
%div{ class: container_class } %div{ class: container_class }
= render 'shared/labels/nav' = render 'shared/labels/nav', labels_or_filters: labels_or_filters, can_admin_label: can_admin_label
.labels-container.prepend-top-10 .labels-container.prepend-top-10
- if can_admin_label - if can_admin_label
......
...@@ -18,3 +18,7 @@ ...@@ -18,3 +18,7 @@
%button.btn.btn-default{ type: "submit", "aria-label" => _('Submit search') } %button.btn.btn-default{ type: "submit", "aria-label" => _('Submit search') }
= icon("search") = icon("search")
= render 'shared/labels/sort_dropdown' = render 'shared/labels/sort_dropdown'
- if labels_or_filters && can_admin_label && @project
= link_to _('New label'), new_project_label_path(@project), class: "btn btn-success qa-label-create-new"
- if labels_or_filters && can_admin_label && @group
= link_to _('New label'), new_group_label_path(@group), class: "btn btn-success qa-label-create-new"
---
title: Moved primary button for labels to follow the design patterns used on rest of the site
merge_request:
author: Martin Hobert
type: fixed
...@@ -2,7 +2,7 @@ module QA ...@@ -2,7 +2,7 @@ module QA
module Page module Page
module Label module Label
class Index < Page::Base class Index < Page::Base
view 'app/views/projects/labels/index.html.haml' do view 'app/views/shared/labels/_nav.html.haml' do
element :label_create_new element :label_create_new
end end
......
...@@ -125,7 +125,7 @@ describe 'Prioritize labels' do ...@@ -125,7 +125,7 @@ describe 'Prioritize labels' do
wait_for_requests wait_for_requests
end end
page.within('.breadcrumbs-container') do page.within('.top-area') do
expect(page).to have_link('New label') expect(page).to have_link('New label')
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment