<% if @filter_for_emails.blank? %>
  <div class="alert alert-info alert-dismissible">
    <h5><i class="icon fas fa-info"></i> Informacja</h5>
      Brak elementów na liście
  </div>
<% else %>

<table class="table table-bordered">
  <thead>
    <tr>
      <th>E-mail</th>
      <th>Utworzono</th>
      <th style="width: 200px">Akcje</th>
    </tr>
  </thead>

  <tbody>
    <% @filter_for_emails.each do |filter_for_email| %>
      <tr>
        <td><%= filter_for_email.email %></td>
        <td><%= filter_for_email.created_at.strftime("%Y-%m-%d %H:%M:%S") unless filter_for_email.created_at.blank? %></td>
        <td>
          <%= link_to raw('<i class="fas fa-trash-can"></i> Usuń'), "/settings/filter_for_emails/#{filter_for_email.id}", class: 'btn-sm btn-danger', method: :delete, data: { confirm: 'Czy na pewno?' } %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<% end %>
