2016-05-11 16:43:58 -04:00
|
|
|
- grouped_emojis = awardable.grouped_awards(with_thumbs: inline)
|
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",
|
2018-08-24 06:13:41 -04:00
|
|
|
class: [(award_state_class(awardable, awards, current_user))],
|
2018-08-15 07:37:24 -04:00
|
|
|
data: { 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
|
|
|
|
|
2018-04-06 14:19:37 -04:00
|
|
|
- if can?(current_user, :award_emoji, awardable)
|
2016-04-16 15:09:08 -04:00
|
|
|
.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',
|
2018-06-13 07:25:19 -04:00
|
|
|
'aria-label': _('Add reaction'),
|
2018-08-15 07:37:24 -04:00
|
|
|
data: { title: _('Add reaction') } }
|
2019-05-23 08:29:32 -04:00
|
|
|
%span{ class: "award-control-icon award-control-icon-neutral" }= sprite_icon('slight-smile')
|
|
|
|
%span{ class: "award-control-icon award-control-icon-positive" }= sprite_icon('smiley')
|
|
|
|
%span{ class: "award-control-icon award-control-icon-super-positive" }= sprite_icon('smile')
|
2016-06-01 05:23:09 -04:00
|
|
|
= icon('spinner spin', class: "award-control-icon award-control-icon-loading")
|