summaryrefslogtreecommitdiff
path: root/app/views/alerts/index.html.erb
blob: 1d441a274139e8a24b9543318ac8bf37a6d71b9c (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
31
32
33
<h1>Listing alerts</h1>

<table>
  <thead>
    <tr>
      <th>Author</th>
      <th>Message</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <% if !@alerts.nil? %>
      <% @alerts.each do |alert| %>
        <tr>
          <td><%= alert.author %></td>
          <td><%= alert.message %></td>
          <td><%= link_to 'Show', alert %></td>
          <td><%= link_to 'Edit', edit_alert_path(alert) %></td>
          <td><%= link_to 'Destroy', alert, method: :delete, data: { confirm: 'Are you sure?' } %></td>
        </tr>
      <% end %> 
    <% else %>
      <td><p>There are no alerts!</p></td>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Alert', new_alert_path %>