diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-06-12 16:45:38 +0000 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-06-16 09:14:21 +0100 |
commit | 4cc175f8685b8dc3a223fa8418cbcc63e0d199dc (patch) | |
tree | 7b0e305a18b002dad1c29642a1e29016897d6188 | |
parent | 0d5fbd957fcc7fba91e6f197dab0810a90a6d382 (diff) | |
download | gitlab-ce-4cc175f8685b8dc3a223fa8418cbcc63e0d199dc.tar.gz |
Update _more_actions_dropdown.html.haml to only show 'Edit comment' when user is allowed to edit the note and only show 'Report as abuse' when the note doesn't belong to current_user
-rw-r--r-- | app/views/projects/notes/_more_actions_dropdown.html.haml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/views/projects/notes/_more_actions_dropdown.html.haml b/app/views/projects/notes/_more_actions_dropdown.html.haml index e0d45054854..0998f6843d3 100644 --- a/app/views/projects/notes/_more_actions_dropdown.html.haml +++ b/app/views/projects/notes/_more_actions_dropdown.html.haml @@ -2,12 +2,14 @@ = button_tag title: 'More actions', class: 'note-action-button more-actions-toggle has-tooltip btn btn-transparent', data: { toggle: 'dropdown', container: 'body' } do = icon('ellipsis-v', class: 'icon') %ul.dropdown-menu.more-actions-dropdown.dropdown-open-left - %li - = button_tag 'Edit comment', class: 'js-note-edit btn btn-transparent' - %li.divider + - if note_editable %li - = link_to new_abuse_report_path(user_id: note.author.id, ref_url: noteable_note_url(note)) do - Report as abuse + = button_tag 'Edit comment', class: 'js-note-edit btn btn-transparent' + %li.divider + - if current_user != note.author + %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 |