Commit 4cc175f8 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Update _more_actions_dropdown.html.haml to only show 'Edit comment' when user...

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
parent 0d5fbd95
...@@ -2,12 +2,14 @@ ...@@ -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 = 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') = icon('ellipsis-v', class: 'icon')
%ul.dropdown-menu.more-actions-dropdown.dropdown-open-left %ul.dropdown-menu.more-actions-dropdown.dropdown-open-left
%li - if note_editable
= button_tag 'Edit comment', class: 'js-note-edit btn btn-transparent'
%li.divider
%li %li
= link_to new_abuse_report_path(user_id: note.author.id, ref_url: noteable_note_url(note)) do = button_tag 'Edit comment', class: 'js-note-edit btn btn-transparent'
Report as abuse %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 - if note_editable
%li %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 = 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment