summaryrefslogtreecommitdiff
path: root/app/views/agents/events/index.html.erb
blob: 32f656247f72fcd72ec564b6f660d67add1287ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<div class="row">
  <div class="small-12 columns">
    <p id="notice"><%= notice %></p>

    <h1>Listing Events</h1>
    <%= link_to 'New Event', new_agent_event_path(@agent), class: 'button' %>

    <table>
      <thead>
        <tr>
          <th>Name</th>
          <th>Data</th>
          <th>Created At</th>
          <th></th>
        </tr>
      </thead>

      <tbody>
        <% @events.each do |event| %>
          <tr>
            <td><%= event.name %></td>
            <td><%= event.data %></td>
            <td><%= event.created_at %></td>
            <td><%= link_to 'Destroy', [@agent, event], method: :delete, data: { confirm: 'Are you sure?' } %></td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>
</div>