<%= link_to 'Mark all as read',
mark_all_as_read_mailbox_path(@mailbox),
class: 'button button--primary',
method: :post,
'data-confirm': 'Are you sure you want to mark all emails as read?' %>
<%= link_to 'Clear mailbox',
clear_mailbox_mailbox_path(@mailbox),
class: 'button button--danger',
method: :post,
'data-confirm': 'Are you sure you want to delete all emails?' %>
<% end %>
<% if @emails.any? %>
From
ToSubjectReceived At
<% @emails.each do |email| %>
<%= render(EmailListEntryComponent.new(email: email)) %>
<% end %>
<% else %>