diff options
author | Annabel Dunstone Gray <annabel.m.gray@gmail.com> | 2018-11-05 12:32:21 +0000 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.m.gray@gmail.com> | 2018-11-05 12:32:21 +0000 |
commit | a5fa8228f6d1c79431396a58ea289dc7a9a4b6d6 (patch) | |
tree | d99a02c7e4f907f6964f335b5edb176e2f2d81aa /app | |
parent | f702b39a648467fe047bb468645e4a1ae525f566 (diff) | |
parent | 5abba8bf1cafdc9e126394880ab1ec19e47c8f09 (diff) | |
download | gitlab-ce-a5fa8228f6d1c79431396a58ea289dc7a9a4b6d6.tar.gz |
Merge branch 'gt-update-project-and-group-labels-empty-state' into 'master'
Update project and group labels empty state
See merge request gitlab-org/gitlab-ce!22745
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/framework/blocks.scss | 1 | ||||
-rw-r--r-- | app/views/groups/labels/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/labels/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/empty_states/_labels.html.haml | 9 |
4 files changed, 9 insertions, 5 deletions
diff --git a/app/assets/stylesheets/framework/blocks.scss b/app/assets/stylesheets/framework/blocks.scss index f26b1fddae5..43b7c26b272 100644 --- a/app/assets/stylesheets/framework/blocks.scss +++ b/app/assets/stylesheets/framework/blocks.scss @@ -348,6 +348,7 @@ @include media-breakpoint-down(xs) { width: 100%; + margin: $btn-side-margin 0; } } } diff --git a/app/views/groups/labels/index.html.haml b/app/views/groups/labels/index.html.haml index 5b78ce910b8..4df3d831942 100644 --- a/app/views/groups/labels/index.html.haml +++ b/app/views/groups/labels/index.html.haml @@ -6,7 +6,7 @@ - subscribed = params[:subscribed] - labels_or_filters = @labels.exists? || search.present? || subscribed.present? -- if can_admin_label +- 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" diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml index 06ee883d6dc..2c6484c2c99 100644 --- a/app/views/projects/labels/index.html.haml +++ b/app/views/projects/labels/index.html.haml @@ -5,7 +5,7 @@ - subscribed = params[:subscribed] - labels_or_filters = @labels.exists? || @prioritized_labels.exists? || search.present? || subscribed.present? -- if can_admin_label +- if @labels.present? && 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" diff --git a/app/views/shared/empty_states/_labels.html.haml b/app/views/shared/empty_states/_labels.html.haml index b629ceafeb3..9133ce8ed22 100644 --- a/app/views/shared/empty_states/_labels.html.haml +++ b/app/views/shared/empty_states/_labels.html.haml @@ -6,6 +6,9 @@ .text-content %h4= _("Labels can be applied to issues and merge requests to categorize them.") %p= _("You can also star a label to make it a priority label.") - - if can?(current_user, :admin_label, @project) - = link_to _('New label'), new_project_label_path(@project), class: 'btn btn-success', title: _('New label'), id: 'new_label_link' - = link_to _('Generate a default set of labels'), generate_project_labels_path(@project), method: :post, class: 'btn btn-success btn-inverted', title: _('Generate a default set of labels'), id: 'generate_labels_link' + .text-center + - if can?(current_user, :admin_label, @project) + = link_to _('New label'), new_project_label_path(@project), class: 'btn btn-success', title: _('New label'), id: 'new_label_link' + = link_to _('Generate a default set of labels'), generate_project_labels_path(@project), method: :post, class: 'btn btn-success btn-inverted', title: _('Generate a default set of labels'), id: 'generate_labels_link' + - if can?(current_user, :admin_label, @group) + = link_to _('New label'), new_group_label_path(@group), class: 'btn btn-success', title: _('New label'), id: 'new_label_link' |