summaryrefslogtreecommitdiff
path: root/app/views/projects/notes
diff options
context:
space:
mode:
authorbarthc <mackintosh02@gmail.com>2016-09-08 11:08:09 +0100
committerbarthc <mackintosh02@gmail.com>2017-04-14 09:33:28 +0100
commit04e2dde538b7a91de0ffdd09d355e9c990b4c7b1 (patch)
tree8139527c01760cfec392d5250583f5d9b4459f74 /app/views/projects/notes
parent0497d3eadb67f347a6376c77cbd39511e5136bfb (diff)
downloadgitlab-ce-04e2dde538b7a91de0ffdd09d355e9c990b4c7b1.tar.gz
frontend prevent authored votes
Diffstat (limited to 'app/views/projects/notes')
-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 1f021ad77e5..a6fbe2c441f 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -59,7 +59,8 @@
- if current_user
- if note.emoji_awardable?
- = link_to '#', title: 'Award Emoji', class: 'note-action-button note-emoji-button js-add-award js-note-emoji', data: { position: 'right' } do
+ - user_authored = note.user_authored?(current_user)
+ = link_to '#', title: 'Award Emoji', class: "note-action-button note-emoji-button js-add-award js-note-emoji #{'js-user-authored' if user_authored}", data: { position: 'right' } do
= icon('spinner spin')
%span{ class: "link-highlight award-control-icon-neutral" }= custom_icon('emoji_slightly_smiling_face')
%span{ class: "link-highlight award-control-icon-positive" }= custom_icon('emoji_smiley')