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

27 lines
1.5 KiB
Plaintext
Raw Normal View History

<tr class="<%= cycle('bg-white', 'bg-gray-50', :name => 'zebra') %>">
<td class="px-6 py-4 whitespace-nowrap"><%= email.date.strftime("%Y-%m-%d %H:%M") %></td>
<td class="px-6 py-4"><%= email.subject %></td>
<td class="px-2 py-1 space-x-1">
2021-01-31 17:17:37 +01:00
<% email.organisations.each do |organisation| %>
<span class="flex px-2 inline-flex text-xs leading-5 font-semibold rounded-full email_attribute_organisation"><%= organisation %></span>
2021-01-31 17:17:37 +01:00
<% end if email.organisations %>
<% email.servers.each do |server| %>
<span class="flex px-2 inline-flex text-xs leading-5 font-semibold rounded-full email_attribute_server"><%= server %></span>
2021-01-31 17:17:37 +01:00
<% end if email.servers %>
<% if email.cron? %>
<span class="flex px-2 inline-flex text-xs leading-5 font-semibold rounded-full email_attribute_cron">cron</span>
2021-01-31 17:17:37 +01:00
<% end %>
<% if email.mailing_list? %>
<span class="flex px-2 inline-flex text-xs leading-5 font-semibold rounded-full email_attribute_mailing_list">list</span>
2021-01-31 17:17:37 +01:00
<% end %>
<% if email.junk? %>
<span class="flex px-2 inline-flex text-xs leading-5 font-semibold rounded-full email_attribute_junk">junk</span>
2021-01-31 17:17:37 +01:00
<% end %>
</td>
<td class="px-2 py-1">
<%= link_to 'Show', email, "data-turbo-frame": "_top", class: "flex" %>
<%= link_to 'Edit', edit_email_path(email), "data-turbo-frame": "_top", class: "flex" %>
<%= link_to 'Destroy', email, method: :delete, data: { confirm: 'Are you sure?' }, "data-turbo-frame": "_top", class: "flex" %>
</td>
2021-01-31 17:17:37 +01:00
</tr>