41 lines
1.8 KiB
Plaintext
41 lines
1.8 KiB
Plaintext
|
|
<div class="shadow overflow-auto border-b border-gray-200 rounded-lg">
|
|
<table class="min-w-full divide-y divide-gray-200">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th scope="col" class="px-2 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
|
|
<th scope="col" class="px-2 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">From</th>
|
|
<th scope="col" class="px-2 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Subject</th>
|
|
<th scope="col" class="px-2 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Metadata</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody class="text-sm bg-white divide-y divide-gray-200">
|
|
<% emails.each do |email| %>
|
|
<%= render partial: "list_row", object: email, as: :email %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
|
|
<div class="flex-1 flex justify-between sm:hidden">
|
|
<%= link_to_previous_page @emails, 'Previous page', class: "ml-3 paginate-page paginate-page-single" %>
|
|
<%= link_to_next_page @emails, 'Next Page', class: "paginate-page paginate-page-single" %>
|
|
</div>
|
|
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
|
<div>
|
|
<p class="text-sm text-gray-700">
|
|
Showing
|
|
<span class="font-medium"><%= @emails.offset_value + 1 %></span>
|
|
to
|
|
<span class="font-medium"><%= @emails.offset_value + (@emails.respond_to?(:records) ? @emails.records : @emails.to_a).size %></span>
|
|
of
|
|
<span class="font-medium"><%= @emails.total_count %></span>
|
|
results
|
|
</p>
|
|
</div>
|
|
<%= paginate @emails %>
|
|
</div>
|
|
</div>
|
|
</div>
|