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))],
|
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
|
|
|
|
|
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'),
|
|
|
|
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")
|