summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2016-06-09 00:27:09 +0000
committerJacob Schatz <jschatz@gitlab.com>2016-06-09 00:27:09 +0000
commit13fd88faa3a334e0a9d221c578abde686d45e368 (patch)
tree02c466c7c4da183e5fb34a711530f4f51c3ee389
parentf5818baffd305f6ea6a9cf8b00e0270cd43f3761 (diff)
parentbdc995bf00794f96af46d92f61a940896c1404d0 (diff)
downloadgitlab-ce-13fd88faa3a334e0a9d221c578abde686d45e368.tar.gz
Merge branch 'fix-award-emoji-hidden' into 'master'
Shows award emoji for comments to all users who are logged in. ## What does this MR do? Fixes the award emoji picker not showing up for users who weren't able to edit another user's comment. ## Screenshots (if relevant) Before: ![Screen_Shot_2016-06-08_at_5.18.04_PM](/uploads/a8b40ba319481f53d55de055d84649b9/Screen_Shot_2016-06-08_at_5.18.04_PM.png) After (logged in): ![Screen_Shot_2016-06-08_at_5.16.16_PM](/uploads/535edcca6fbdd8834beda39399f85384/Screen_Shot_2016-06-08_at_5.16.16_PM.png) After (logged out): ![Screen_Shot_2016-06-08_at_5.15.08_PM](/uploads/7f0dff751714c7d20f78b56893cacd59/Screen_Shot_2016-06-08_at_5.15.08_PM.png) cc: @fatihacet See merge request !4547
-rw-r--r--app/views/projects/notes/_note.html.haml3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index 5ddd0ecc4c1..bcdbff08011 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -20,10 +20,11 @@
- access = note.project.team.human_max_access(note.author.id)
- if access
%span.note-role.hidden-xs= access
- - if note_editable
+ - if current_user
= link_to '#', title: 'Award Emoji', class: 'note-action-button note-emoji-button js-add-award js-note-emoji', data: { position: 'right' } do
= icon('spinner spin')
= icon('smile-o')
+ - if note_editable
= link_to '#', title: 'Edit comment', class: 'note-action-button js-note-edit' do
= icon('pencil')
= link_to namespace_project_note_path(note.project.namespace, note.project, note), title: 'Remove comment', method: :delete, data: { confirm: 'Are you sure you want to remove this comment?' }, remote: true, class: 'note-action-button hidden-xs js-note-delete danger' do