2016-05-11 20:43:58 +00:00
|
|
|
- grouped_emojis = awardable.grouped_awards(with_thumbs: inline)
|
2016-09-08 10:08:09 +00:00
|
|
|
- user_authored = awardable.user_authored?(current_user)
|
2016-09-04 08:51:12 +00:00
|
|
|
.awards.js-awards-block{ class: ("hidden" if !inline && grouped_emojis.empty?), data: { award_url: toggle_award_url(awardable) } }
|
2016-04-25 08:09:39 +00:00
|
|
|
- awards_sort(grouped_emojis).each do |emoji, awards|
|
2016-11-22 10:25:09 +00:00
|
|
|
%button.btn.award-control.js-emoji-btn.has-tooltip{ type: "button",
|
2016-09-08 10:08:09 +00:00
|
|
|
class: [(award_state_class(awards, current_user)), (award_user_authored_class(emoji) if user_authored)],
|
2016-11-22 10:25:09 +00:00
|
|
|
data: { placement: "bottom", title: award_user_list(awards, current_user) } }
|
2017-02-28 04:44:34 +00:00
|
|
|
= emoji_icon(emoji)
|
2016-04-16 19:09:08 +00:00
|
|
|
%span.award-control-text.js-counter
|
|
|
|
= awards.count
|
|
|
|
|
|
|
|
- if current_user
|
|
|
|
.award-menu-holder.js-award-holder
|
2017-03-22 00:59:23 +00:00
|
|
|
%button.btn.award-control.has-tooltip.js-add-award{ type: 'button',
|
2017-05-19 22:50:20 +00:00
|
|
|
'aria-label': 'Add reaction',
|
2016-09-08 10:08:09 +00:00
|
|
|
class: ("js-user-authored" if user_authored),
|
2017-05-19 22:50:20 +00:00
|
|
|
data: { title: 'Add reaction', placement: "bottom" } }
|
2017-04-06 13:38:09 +00:00
|
|
|
%span{ class: "award-control-icon award-control-icon-neutral" }= custom_icon('emoji_slightly_smiling_face')
|
|
|
|
%span{ class: "award-control-icon award-control-icon-positive" }= custom_icon('emoji_smiley')
|
|
|
|
%span{ class: "award-control-icon award-control-icon-super-positive" }= custom_icon('emoji_smile')
|
2016-06-01 09:23:09 +00:00
|
|
|
= icon('spinner spin', class: "award-control-icon award-control-icon-loading")
|