debian-mirror-gitlab/app/views/projects/notes/_more_actions_dropdown.html.haml

19 lines
1.2 KiB
Text
Raw Normal View History

2017-09-10 17:25:29 +05:30
- is_current_user = current_user == note.author
- if note_editable || !is_current_user
2021-03-11 19:13:27 +05:30
%div{ class: "dropdown more-actions note-actions-item gl-ml-0!" }
= button_tag title: 'More actions', class: 'note-action-button more-actions-toggle has-tooltip btn gl-button btn-default-tertiary btn-transparent gl-pl-2! gl-pr-0!', data: { toggle: 'dropdown', container: 'body', qa_selector: 'more_actions_dropdown' } do
= sprite_icon('ellipsis_v', css_class: 'gl-button-icon gl-icon gl-text-gray-400')
2017-09-10 17:25:29 +05:30
%ul.dropdown-menu.more-actions-dropdown.dropdown-open-left
2018-03-17 18:26:18 +05:30
%li
2019-12-21 20:55:43 +05:30
= clipboard_button(text: noteable_note_url(note), title: _('Copy reference'), button_text: _('Copy link'), class: 'btn-clipboard', hide_tooltip: true, hide_button_icon: true)
2017-09-10 17:25:29 +05:30
- unless is_current_user
%li
= link_to new_abuse_report_path(user_id: note.author.id, ref_url: noteable_note_url(note)) do
2019-09-04 21:01:54 +05:30
= _('Report abuse to admin')
2017-09-10 17:25:29 +05:30
- if note_editable
%li
2020-07-28 23:09:34 +05:30
= link_to note_url(note), method: :delete, data: { confirm: 'Are you sure you want to delete this comment?', qa_selector: 'delete_comment_button' }, remote: true, class: 'js-note-delete' do
2018-12-13 13:39:08 +05:30
%span.text-danger
= _('Delete comment')