EvoBal/app/views/emails/index.html.erb

42 lines
1 KiB
Plaintext

<p id="notice"><%= notice %></p>
<h1>Emails</h1>
<table>
<thead>
<tr>
<th>Date</th>
<th>Subject</th>
<th>Clients</th>
<th>Servers</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @emails.each do |email| %>
<tr>
<td><%= email.date %></td>
<td><%= email.subject %></td>
<td>
<% email.organisations.each do |organisation| %>
<span class="email_attribute_organisation"><%= organisation %></span>
<% end if email.organisations %>
</td>
<td>
<% email.servers.each do |server| %>
<span class="email_attribute_server"><%= server %></span>
<% end if email.servers %>
</td>
<td><%= link_to 'Show', email %></td>
<td><%= link_to 'Edit', edit_email_path(email) %></td>
<td><%= link_to 'Destroy', email, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Email', new_email_path %>