<div id="event_<%= event.id %>_actions" class="actions">
  <% event_likes_count = event.likes_dataset.count %>
  <% if current_site %>
    <a href="#" id="like" data-placement="bottom" data-toggle="tooltip" data-original-title="<%= event.liking_site_usernames.join('<br>') %>" onclick="new Like(<%= event.id %>, '<%= csrf_token %>').toggleLike(); return false"><%= event.site_likes?(current_site) ? 'Unlike' : 'Like' %><%= event_likes_count > 0 ? " (#{event_likes_count})" : '' %></a>
  <% else %>
    <% if event_likes_count > 0 %>
      <%= event_likes_count %>&nbsp;<%= event_likes_count == 1 ? 'like' : 'likes' %>
    <% end %>
  <% end %>
  <% if current_site && event.site.profile_comments_enabled && current_site.commenting_allowed? %>
    <a id="reply" href="#" onclick="Template.renderComment(<%= event.id %>); return false">
      <% if event.profile_comment_id %>
        Reply
      <% else %>
        Comment
      <% end %>
    </a>
    <% if event.profile_comment_id && event.created_by?(current_site) %>
        <a id="editLink" href="#" onclick="ProfileComment.displayEditor('<%= event.id %>'); return false">Edit</a>
    <% end %>
    <% if event.created_by?(current_site) || event.site_id == current_site.id %>
      <a href="#" onclick="Event.delete(<%= event.id %>, '<%= csrf_token %>'); return false">Delete</a>
    <% end %>
  <% end %>
</div>
