2021-04-29 21:17:54 +05:30
|
|
|
- api_awards_path = local_assigns.fetch(:api_awards_path, nil)
|
2016-06-16 23:09:34 +05:30
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
- if api_awards_path
|
2022-10-11 01:57:18 +05:30
|
|
|
.gl-display-flex.gl-flex-wrap.gl-justify-content-space-between
|
2021-04-29 21:17:54 +05:30
|
|
|
#js-vue-awards-block{ data: { path: api_awards_path, can_award_emoji: can?(current_user, :award_emoji, awardable).to_s } }
|
|
|
|
= yield
|
|
|
|
- else
|
|
|
|
- grouped_emojis = awardable.grouped_awards(with_thumbs: inline)
|
|
|
|
.awards.js-awards-block{ class: ("hidden" if !inline && grouped_emojis.empty?), data: { award_url: toggle_award_url(awardable) } }
|
|
|
|
- awards_sort(grouped_emojis).each do |emoji, awards|
|
|
|
|
%button.gl-button.btn.btn-default.award-control.js-emoji-btn.has-tooltip{ type: "button",
|
|
|
|
class: [award_state_class(awardable, awards, current_user)],
|
|
|
|
data: { title: award_user_list(awards, current_user) } }
|
|
|
|
= emoji_icon(emoji)
|
|
|
|
%span.award-control-text.js-counter
|
|
|
|
= awards.count
|
|
|
|
|
|
|
|
- if can?(current_user, :award_emoji, awardable)
|
|
|
|
.award-menu-holder.js-award-holder
|
|
|
|
%button.gl-button.btn.btn-default.award-control.has-tooltip.js-add-award{ type: 'button',
|
|
|
|
'aria-label': _('Add reaction'),
|
|
|
|
data: { title: _('Add reaction') } }
|
2022-07-23 23:45:48 +05:30
|
|
|
%span{ class: "award-control-icon award-control-icon-neutral gl-icon" }= sprite_icon('slight-smile')
|
|
|
|
%span{ class: "award-control-icon award-control-icon-positive gl-icon" }= sprite_icon('smiley')
|
|
|
|
%span{ class: "award-control-icon award-control-icon-super-positive gl-icon" }= sprite_icon('smile')
|
2021-04-29 21:17:54 +05:30
|
|
|
= yield
|