<% # expects local variables kudos, guest_kudos_count, commentable %>
<h3 class="landmark heading"><%= ts("Applause!") %></h3>
<div id="kudos">
  <% has_user_kudos = kudos.exists? %>
  <% if has_user_kudos || guest_kudos_count > 0 %>
    <% cache "#{commentable.cache_key}/kudos-v4", expires_in: ArchiveConfig.MINUTES_UNTIL_COMMENTABLE_KUDOS_LISTS_EXPIRE.minutes, race_condition_ttl: 10.seconds, skip_digest: true do %>
      <p class="kudos">
        <% if has_user_kudos %>
          <%= kudos_user_links(commentable, kudos, showing_more: false) %>
        <% end %>
        <% if guest_kudos_count > 0 %>
          <% if has_user_kudos %>
            <%= ts(" as well as ") %>
          <% end %>
          <%= ts(pluralize(guest_kudos_count, "guest")) %>
        <% end %>
        <%= ts(" left applause for this work!") %>
      </p>
    <% end %>
  <% end %>
</div>
