gitlab-org--gitlab-foss/app/views/award_emoji/_awards_block.html.haml

22 lines
1.3 KiB
Text
Raw Normal View History

2016-05-11 16:43:58 -04:00
- grouped_emojis = awardable.grouped_awards(with_thumbs: inline)
2016-09-08 06:08:09 -04:00
- user_authored = awardable.user_authored?(current_user)
.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.btn.award-control.js-emoji-btn.has-tooltip{ type: "button",
2016-09-08 06:08:09 -04:00
class: [(award_state_class(awards, current_user)), (award_user_authored_class(emoji) if user_authored)],
data: { placement: "bottom", title: award_user_list(awards, current_user) } }
= emoji_icon(emoji)
2016-04-16 15:09:08 -04:00
%span.award-control-text.js-counter
= awards.count
- if current_user
.award-menu-holder.js-award-holder
%button.btn.award-control.has-tooltip.js-add-award{ type: 'button',
'aria-label': 'Add reaction',
2016-09-08 06:08:09 -04:00
class: ("js-user-authored" if user_authored),
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")