diff options
Diffstat (limited to 'app/views/projects/notes/_more_actions_dropdown.html.haml')
-rw-r--r-- | app/views/projects/notes/_more_actions_dropdown.html.haml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/views/projects/notes/_more_actions_dropdown.html.haml b/app/views/projects/notes/_more_actions_dropdown.html.haml new file mode 100644 index 00000000000..5930209a682 --- /dev/null +++ b/app/views/projects/notes/_more_actions_dropdown.html.haml @@ -0,0 +1,16 @@ +- is_current_user = current_user == note.author + +- if note_editable || !is_current_user + .dropdown.more-actions.note-actions-item + = button_tag title: 'More actions', class: 'note-action-button more-actions-toggle has-tooltip btn btn-transparent', data: { toggle: 'dropdown', container: 'body' } do + %span.icon + = custom_icon('ellipsis_v') + %ul.dropdown-menu.more-actions-dropdown.dropdown-open-left + - unless is_current_user + %li + = link_to new_abuse_report_path(user_id: note.author.id, ref_url: noteable_note_url(note)) do + Report as abuse + - if note_editable + %li + = link_to note_url(note), method: :delete, data: { confirm: 'Are you sure you want to delete this comment?' }, remote: true, class: 'js-note-delete' do + %span.text-danger Delete comment |