diff options
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/_label.html.haml | 12 | ||||
-rw-r--r-- | app/views/shared/_label_row.html.haml | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml index 391021a7665..658d546a4a4 100644 --- a/app/views/shared/_label.html.haml +++ b/app/views/shared/_label.html.haml @@ -11,22 +11,22 @@ %li.label-list-item{ id: label_css_id, data: { id: label.id } } = render "shared/label_row", label: label, subject: subject, force_priority: force_priority %ul.label-actions-list - - if controller.is_a?(Projects::LabelsController) + - if @project %li.inline .label-badge.label-badge-gray= label.model_name.human.capitalize - if can?(current_user, :admin_label, @project) %li.inline.js-toggle-priority{ data: { url: remove_priority_project_label_path(@project, label), dom_id: dom_id(label), type: label.type } } - %button.label-action.add-priority.btn.btn-transparent.has-tooltip{ title: _('Prioritize'), type: 'button', :'data-placement' => 'top' } + %button.label-action.add-priority.btn.btn-transparent.has-tooltip{ title: _('Prioritize'), type: 'button', data: { placement: 'top' }, aria_label: _('Prioritize label') } = sprite_icon('star-o') - %button.label-action.remove-priority.btn.btn-transparent.has-tooltip{ title: _('Remove priority'), type: 'button', :'data-placement' => 'top' } + %button.label-action.remove-priority.btn.btn-transparent.has-tooltip{ title: _('Remove priority'), type: 'button', data: { placement: 'top' }, aria_label: _('Deprioritize label') } = sprite_icon('star') %li.inline - = link_to edit_label_path(label), class: 'btn btn-transparent label-action' do + = link_to edit_label_path(label), class: 'btn btn-transparent label-action', aria_label: 'Edit label' do = sprite_icon('pencil') %li.inline .dropdown - %button{ type: 'button', class: 'btn btn-transparent js-label-options-dropdown label-action', data: { toggle: '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 @@ -44,7 +44,7 @@ = _('Promote to group label') %li %span{ data: { toggle: 'modal', target: "#modal-delete-label-#{label.id}" } } - = button_tag 'Delete', type: 'button', class: 'text-danger remove-row' + %button.text-danger.remove-row{ type: 'button' }= _('Delete') - if current_user %li.inline.label-subscription - if can_subscribe_to_label_in_different_levels?(label) diff --git a/app/views/shared/_label_row.html.haml b/app/views/shared/_label_row.html.haml index ed23db156bc..0ae3ab8f090 100644 --- a/app/views/shared/_label_row.html.haml +++ b/app/views/shared/_label_row.html.haml @@ -6,7 +6,7 @@ .label-name = link_to_label(label, subject: @project, tooltip: false) .label-description - .append-right-15.prepend-left-15 + .append-right-default.prepend-left-default - if label.description.present? .description-text.append-bottom-10 = markdown_field(label, :description) |