BigW Consortium Gitlab

_awards_block.html.haml 940 Bytes
Newer Older
1
- grouped_emojis = awardable.grouped_awards(with_thumbs: inline)
2
.awards.js-awards-block{ class: ("hidden" if !inline && grouped_emojis.empty?), data: { award_url: toggle_award_url(awardable) } }
3
  - awards_sort(grouped_emojis).each do |emoji, awards|
4 5 6 7
    %button.btn.award-control.js-emoji-btn.has-tooltip{ type: "button",
      disabled: !current_user,
      class: (award_active_class(awards, current_user)),
      data: { placement: "bottom", title: award_user_list(awards, current_user) } }
8
      = emoji_icon(emoji, sprite: false)
9 10 11 12 13
      %span.award-control-text.js-counter
        = awards.count

  - if current_user
    .award-menu-holder.js-award-holder
14
      %button.btn.award-control.js-add-award{ type: "button" }
15 16
        = icon('smile-o', class: "award-control-icon award-control-icon-normal")
        = icon('spinner spin', class: "award-control-icon award-control-icon-loading")
17 18
        %span.award-control-text
          Add