<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 %>
    <% if 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>
    <% end %>
    <% 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="#deleteEvent<%= event.id %>" data-toggle="modal">Delete</a>
    <% end %>
  <% end %>
</div>

<% if current_site %>
  <div class="modal hide" id="deleteEvent<%= event.id %>" tabindex="-1" role="dialog" aria-labelledby="deleteEventLabel<%= event.id %>" aria-hidden="true">
    <div class="modal-header">
      <button class="close" type="button" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button>
      <h3 id="addTagLabel">Delete</h3>
    </div>
    <div class="modal-body">
      <p>
        Are you sure you want to remove this <%= event.name %> from the news feed?
      </p>
    </div>
    <div class="modal-footer">
      <button class="btn cancel" data-dismiss="modal" aria-hidden="true">Cancel</button>
      <button type="submit" class="btn-Action" onclick="Event.delete(<%= event.id %>, '<%= csrf_token %>'); return false">Delete</button>
    </div>
  </div>
<% end %>