<% content_for :title, (@agent ? @agent.name + "'s " : "") + "Events" -%>
<% unless @agent %> <% end %> <% @events.each do |event| %> <% next unless event.agent %> <%= content_tag :tr, class: (highlighted?(event.id) ? 'hl' : nil) do %> <% unless @agent %> <% end %> <% end %> <% end %>
SourceCreated Payload
<%= link_to event.agent.name, agent_path(event.agent, return: request.fullpath) %><%= time_ago_in_words event.created_at %> ago <%= truncate event.payload.to_json, :length => 90, :omission => "" %>
<%= link_to 'Show', event_path(event, return: request.fullpath), class: "btn btn-default" %> <%= link_to 'Re-emit', reemit_event_path(event), method: :post, data: { confirm: 'Are you sure you want to duplicate this event and emit the new one now?' }, class: "btn btn-default" %> <%= link_to 'Delete', event_path(event), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-default" %>
<%= paginate @events, params: params.to_unsafe_h.slice(:hl), theme: 'twitter-bootstrap-3' %>
<% if @agent %>
<%= link_to icon_tag('glyphicon-chevron-left') + ' Back'.html_safe, filtered_agent_return_link || agents_path, class: "btn btn-default" %> <%= link_to icon_tag('glyphicon-random') + ' See all events'.html_safe, events_path, class: "btn btn-default" %>
<% end %>