Sha256: 30b3e4cec4deaad9b6cc329dd3a4cc62c3934aac9d540e14e3df4dcbdfbf33ca

Contents?: true

Size: 1.36 KB

Versions: 3

Compression:

Stored size: 1.36 KB

Contents

<div class="col left">
  <h1>
    Letters
    <span class="pull-right">
      <%= link_to letters_path, class: 'btn refresh' do %>
        <i class="icon-refresh"></i>
        Refresh
      <% end %>
      <%= link_to clear_letters_path, method: 'delete', data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' do %>
        <i class="icon-trash icon-white"></i>
        Clear
      <% end %>
    </span>
  </h1>
  <table class="table table-hover letter-opener" data-letters-path="<%= letters_path %>">
    <thead>
      <tr>
        <th>ID</th>
        <th>Sent at</th>
      </tr>
    </thead>
    <tbody>
      <% if first_letter = @letters.shift %>
        <tr class="active">
          <td>
            <%= link_to(first_letter.id, letter_path(first_letter, style: first_letter.default_style), target: 'mail') %>
          </td>
          <td><%= first_letter.sent_at %></td>
        </tr>
      <% end %>
      <% @letters.each do |letter| %>
        <tr>
          <td>
            <%= link_to(letter.id, letter_path(letter, style: letter.default_style), target: 'mail') %>
          </td>
          <td><%= letter.sent_at %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
<div class="col right">
  <iframe name="mail" id="mail" src="<%= first_letter.present? ? letter_path(first_letter, style: first_letter.default_style) : 'about:blank' %>"></iframe>
</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
letter_opener_web-1.1.3 app/views/letter_opener_web/letters/index.html.erb
letter_opener_web-1.1.2 app/views/letter_opener_web/letters/index.html.erb
letter_opener_web-1.1.1 app/views/letter_opener_web/letters/index.html.erb