Sha256: 3baead5e4ce3b5b37fcac7f32283b8ecc7669923b2f0e254350eac60b881b46c

Contents?: true

Size: 970 Bytes

Versions: 2

Compression:

Stored size: 970 Bytes

Contents

<nav>
  <%= link_to "Back to app", main_app.root_path if main_app.respond_to?(:root_path) %>
  <h1>Sent Emails</h1>
  <%= link_to "Mailbin on GitHub", "https://github.com/excid3/mailbin", target: :_blank %>
</nav>

<% if @emails.any? %>
  <table class="email-list">
    <thead>
      <tr>
        <th>Subject</th>
        <th>Sent At</th>
        <th>
          <%= button_to "Clear all", clear_path, method: :delete, class: "btn", data: {turbo_confirm: "Are you sure?"} %>
        </th>
      </tr>
    </thead>
    <tbody>
      <% @emails.each do |email| %>
        <tr>
          <td><%= link_to email.subject, message_path(email.message_id) %></td>
          <td><%= l email.date, format: :long %></td>
          <td><%= button_to "Delete", message_path(email.message_id), method: :delete, data: {turbo_confirm: "Are you sure?"}, class: "btn" %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% else %>
  <p>You have not sent any emails.</p>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mailbin-1.0.0 app/views/mailbin/messages/index.html.erb
mailbin-0.1.1 app/views/mailbin/messages/index.html.erb