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