<% end %>
<% end %>
<% if agent.can_create_events? && agent.events.count > 0 %>
<%= link_to icon_tag('glyphicon-trash', class: 'color-danger') + ' Delete all events', remove_events_agent_path(agent, return: returnTo), method: :delete, data: {confirm: 'Are you sure you want to delete ALL emitted events for this Agent?'}, tabindex: "-1" %>
<% end %>
<%= link_to icon_tag('glyphicon-remove', class: 'color-danger') + ' Delete agent', agent_path(agent, return: returnTo), method: :delete, data: { confirm: 'Are you sure that you want to permanently delete this Agent?' }, tabindex: "-1" %>
Confirm
<% if agent.disabled? %>Enable<% else %>Disable<% end %> "<%= agent.name %>"?