EvoBal/app/views/emails/_list_row.html.erb

29 lines
1.3 KiB
Plaintext

<tr class="<%= cycle('bg-white', 'bg-gray-50', :name => 'zebra') %> <%= "text-gray-500 font-light" if !email.inbox? %>">
<td class="text-center pl-3 pr-1">
<%= form.check_box "ids[]",
{class: "focus:ring-gray-500 h-4 w-4 text-gray-600 border-gray-300 rounded",
data: { "checkboxes-target": "checkboxesItem" }},
email.id, nil %>
</td>
<td class=" whitespace-nowrap"><%= link_to email.date.strftime("%Y-%m-%d %H:%M"), email, "data-turbo-frame": "_top", class: "block p-2" %></td>
<td class=""><%= link_to email.from.join(', '), email, "data-turbo-frame": "_top", class: "block p-2" %></td>
<td class=""><%= link_to email.subject, email, "data-turbo-frame": "_top", class: "block p-2" %></td>
<td class="px-2 py-1 space-y-1 space-x-1">
<% email.organisations.each do |organisation| %>
<span class="pill pill-organisation"><%= organisation %></span>
<% end if email.organisations %>
<% email.servers.each do |server| %>
<span class="pill pill-server"><%= server %></span>
<% end if email.servers %>
<% if email.cron? %>
<span class="pill pill-cron">cron</span>
<% end %>
<% if email.mailing_list? %>
<span class="pill pill-list">list</span>
<% end %>
<% if email.junk? %>
<span class="pill pill-junk">junk</span>
<% end %>
</td>
</tr>