Merge branch '53816-empty-label-menu-if-not-logged-in' into 'master'
Resolve "Empty label menu if not logged in" Closes #53816 See merge request gitlab-org/gitlab-ce!23042
This commit is contained in:
commit
c93439605b
2 changed files with 28 additions and 22 deletions
|
@ -23,28 +23,29 @@
|
|||
%li.inline
|
||||
= link_to edit_label_path(label), class: 'btn btn-transparent label-action edit has-tooltip', title: _('Edit'), data: { placement: 'bottom' }, aria_label: _('Edit') do
|
||||
= sprite_icon('pencil')
|
||||
%li.inline
|
||||
.dropdown
|
||||
%button{ type: 'button', class: 'btn btn-transparent js-label-options-dropdown label-action', data: { toggle: 'dropdown' }, aria_label: _('Label actions dropdown') }
|
||||
= sprite_icon('ellipsis_v')
|
||||
.dropdown-menu.dropdown-open-left
|
||||
%ul
|
||||
- if label.is_a?(ProjectLabel) && label.project.group && can?(current_user, :admin_label, label.project.group)
|
||||
%li
|
||||
%button.js-promote-project-label-button.btn.btn-transparent.btn-action{ disabled: true, type: 'button',
|
||||
data: { url: promote_project_label_path(label.project, label),
|
||||
label_title: label.title,
|
||||
label_color: label.color,
|
||||
label_text_color: label.text_color,
|
||||
group_name: label.project.group.name,
|
||||
target: '#promote-label-modal',
|
||||
container: 'body',
|
||||
toggle: 'modal' } }
|
||||
= _('Promote to group label')
|
||||
- if can?(current_user, :admin_label, label)
|
||||
%li
|
||||
%span{ data: { toggle: 'modal', target: "#modal-delete-label-#{label.id}" } }
|
||||
%button.text-danger.remove-row{ type: 'button' }= _('Delete')
|
||||
- if can?(current_user, :admin_label, label)
|
||||
%li.inline
|
||||
.dropdown
|
||||
%button{ type: 'button', class: 'btn btn-transparent js-label-options-dropdown label-action', data: { toggle: 'dropdown' }, aria_label: _('Label actions dropdown') }
|
||||
= sprite_icon('ellipsis_v')
|
||||
.dropdown-menu.dropdown-open-left
|
||||
%ul
|
||||
- if label.is_a?(ProjectLabel) && label.project.group && can?(current_user, :admin_label, label.project.group)
|
||||
%li
|
||||
%button.js-promote-project-label-button.btn.btn-transparent.btn-action{ disabled: true, type: 'button',
|
||||
data: { url: promote_project_label_path(label.project, label),
|
||||
label_title: label.title,
|
||||
label_color: label.color,
|
||||
label_text_color: label.text_color,
|
||||
group_name: label.project.group.name,
|
||||
target: '#promote-label-modal',
|
||||
container: 'body',
|
||||
toggle: 'modal' } }
|
||||
= _('Promote to group label')
|
||||
- if can?(current_user, :admin_label, label)
|
||||
%li
|
||||
%span{ data: { toggle: 'modal', target: "#modal-delete-label-#{label.id}" } }
|
||||
%button.text-danger.remove-row{ type: 'button' }= _('Delete')
|
||||
- if current_user
|
||||
%li.inline.label-subscription
|
||||
- if can_subscribe_to_label_in_different_levels?(label)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Removes promote to group label for anonymous user
|
||||
merge_request: 23042
|
||||
author: Jacopo Beschi @jacopo-beschi
|
||||
type: fixed
|
Loading…
Reference in a new issue