2016-06-16 23:09:34 +05:30
|
|
|
- grouped_emojis = awardable.grouped_awards(with_thumbs: inline)
|
2016-09-29 09:46:39 +05:30
|
|
|
.awards.js-awards-block{ class: ("hidden" if !inline && grouped_emojis.empty?), data: { award_url: toggle_award_url(awardable) } }
|
2016-06-16 23:09:34 +05:30
|
|
|
- awards_sort(grouped_emojis).each do |emoji, awards|
|
2017-08-17 22:00:37 +05:30
|
|
|
%button.btn.award-control.js-emoji-btn.has-tooltip{ type: "button",
|
2018-11-20 20:47:30 +05:30
|
|
|
class: [(award_state_class(awardable, awards, current_user))],
|
2019-03-02 22:35:43 +05:30
|
|
|
data: { title: award_user_list(awards, current_user) } }
|
2017-08-17 22:00:37 +05:30
|
|
|
= emoji_icon(emoji)
|
2016-06-16 23:09:34 +05:30
|
|
|
%span.award-control-text.js-counter
|
|
|
|
= awards.count
|
|
|
|
|
2018-05-09 12:01:36 +05:30
|
|
|
- if can?(current_user, :award_emoji, awardable)
|
2016-06-16 23:09:34 +05:30
|
|
|
.award-menu-holder.js-award-holder
|
2017-08-17 22:00:37 +05:30
|
|
|
%button.btn.award-control.has-tooltip.js-add-award{ type: 'button',
|
2018-11-08 19:23:39 +05:30
|
|
|
'aria-label': _('Add reaction'),
|
2019-03-02 22:35:43 +05:30
|
|
|
data: { title: _('Add reaction') } }
|
2019-09-04 21:01:54 +05:30
|
|
|
%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-16 23:09:34 +05:30
|
|
|
= icon('spinner spin', class: "award-control-icon award-control-icon-loading")
|