summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-11-19 18:12:17 +0200
committerValery Sizov <vsv2711@gmail.com>2015-11-19 18:12:17 +0200
commitbdf4007cb7b18ed6892455d0a9adf78476188563 (patch)
treed9db5467ff74c4387777e15a9f0a0bbee6f3e81a /app/views
parent671a49cfd53230b57acf579a609bab958e066982 (diff)
downloadgitlab-ce-bdf4007cb7b18ed6892455d0a9adf78476188563.tar.gz
adressing comments
Diffstat (limited to 'app/views')
-rw-r--r--app/views/votes/_votes_block.html.haml14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/views/votes/_votes_block.html.haml b/app/views/votes/_votes_block.html.haml
index 04e3b5a3814..7eb27c12d33 100644
--- a/app/views/votes/_votes_block.html.haml
+++ b/app/views/votes/_votes_block.html.haml
@@ -1,15 +1,15 @@
.awards.votes-block
- - votable.notes.awards.grouped_awards.each do | note |
- .award{class: (note_active_class(note.last, current_user)), title: emoji_author_list(note.last, current_user)}
- .icon{"data-emoji" => "#{note.first}"}
- = image_tag url_to_emoji(note.first), height: "20px", width: "20px"
+ - votable.notes.awards.grouped_awards.each do |emoji, notes|
+ .award{class: (note_active_class(notes, current_user)), title: emoji_author_list(notes, current_user)}
+ .icon{"data-emoji" => "#{emoji}"}
+ = image_tag url_to_emoji(emoji), height: "20px", width: "20px"
.counter
- = note.last.count
+ = notes.count
- if current_user
.dropdown.awards-controls
%a.add-award{"data-toggle" => "dropdown", "data-target" => "#", "href" => "#"}
- = icon('plus-square-o')
+ = icon('smile-o')
%ul.dropdown-menu.awards-menu
- emoji_list.each do |emoji|
%li{"data-emoji" => "#{emoji}"}= image_tag url_to_emoji(emoji), height: "20px", width: "20px"
@@ -17,7 +17,7 @@
- if current_user
:coffeescript
post_emoji_url = "#{award_toggle_namespace_project_notes_path(@project.namespace, @project)}"
- noteable_type = "#{votable.class}"
+ noteable_type = "#{votable.class.name.underscore}"
noteable_id = "#{votable.id}"
window.awards_handler = new AwardsHandler(post_emoji_url, noteable_type, noteable_id)