summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-06-14 16:19:21 +0100
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-06-16 09:14:21 +0100
commit20dcf5f83f9ac2583a2d2607fb8c8761906ec268 (patch)
tree9a343ba96d1c8fa593384263d455b02086d3e8ab
parent0feb16682481c5470e16bb04f1abc429b337f135 (diff)
downloadgitlab-ce-20dcf5f83f9ac2583a2d2607fb8c8761906ec268.tar.gz
[ci skip] Correct rendering more actions dropdown when there are no actions and correct the more actions dropdown divider conditional
-rw-r--r--app/views/projects/notes/_more_actions_dropdown.html.haml8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/views/projects/notes/_more_actions_dropdown.html.haml b/app/views/projects/notes/_more_actions_dropdown.html.haml
index 2851071d2e3..a14e4a61d56 100644
--- a/app/views/projects/notes/_more_actions_dropdown.html.haml
+++ b/app/views/projects/notes/_more_actions_dropdown.html.haml
@@ -1,3 +1,7 @@
+- is_current_user = current_user == note.author
+
+- return unless note_editable || !is_current_user
+
.dropdown.more-actions
= 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')
@@ -5,8 +9,8 @@
- if note_editable
%li
= button_tag 'Edit comment', class: 'js-note-edit btn btn-transparent'
- %li.divider
- - if current_user != note.author
+ %li.divider
+ - 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