debian-mirror-gitlab/app/views/award_emoji/_awards_block.html.haml

20 lines
1.2 KiB
Text
Raw Normal View History

- 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) } }
- 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)
%span.award-control-text.js-counter
= awards.count
2018-05-09 12:01:36 +05:30
- if can?(current_user, :award_emoji, awardable)
.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') } }
2017-08-17 22:00:37 +05:30
%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')
= icon('spinner spin', class: "award-control-icon award-control-icon-loading")