BigW Consortium Gitlab

_awards_block.html.haml 960 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: url_for([:toggle_award_emoji, @project.namespace.becomes(Namespace), @project, awardable]) } }
3
  - awards_sort(grouped_emojis).each do |emoji, awards|
4
    %button.btn.award-control.js-emoji-btn.has-tooltip{ type: "button", class: (award_active_class(awards, current_user)), data: { placement: "bottom", title: award_user_list(awards, current_user) } }
5
      = emoji_icon(emoji, sprite: false)
6 7 8 9 10
      %span.award-control-text.js-counter
        = awards.count

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