gitlab-org--gitlab-foss/app/views/shared/_delete_label_modal.html.haml
Jan Provaznik 4df0e2599b Fix display of promote to group label
Since label presenter is used in label index view, label class
check doesn't work as expected because the class is now LabelPresenter.

Also `label.subject` doesn't work as expected now because Label's model
`subject` method is shadowed by Gitlab's presenter's method which uses
`subject` for referencing the original object.

Instead we use a presenter's method for both checks now.

`label_deletion_confirm_text` is not used anywhere so it's removed
2019-05-28 10:05:20 +00:00

21 lines
741 B
Text

.modal{ id: "modal-delete-label-#{label.id}", tabindex: -1 }
.modal-dialog
.modal-content
.modal-header
%h3.page-title Delete #{render_label(label, tooltip: false)} ?
%button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
%span{ "aria-hidden": true } ×
.modal-body
%p
%strong= label.name
%span will be permanently deleted from #{label.subject_name}. This cannot be undone.
.modal-footer
%a{ href: '#', data: { dismiss: 'modal' }, class: 'btn btn-default' } Cancel
= link_to 'Delete label',
label.destroy_path,
title: 'Delete',
method: :delete,
class: 'btn btn-remove'