diff --git a/app/assets/stylesheets/emails.scss b/app/assets/stylesheets/emails.scss index 5ee78eb..089c57b 100644 --- a/app/assets/stylesheets/emails.scss +++ b/app/assets/stylesheets/emails.scss @@ -1,38 +1,3 @@ // Place all the styles related to the emails controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: https://sass-lang.com/ - -.email_attribute_server { - background-color: cyan; - padding: 1px 2px; - color: #666666; -} -.email_attribute_organisation { - background-color: yellow; - padding: 1px 2px; - color: #666666; -} -.email_attribute_issue { - background-color: orange; - padding: 1px 2px; - color: #666666; -} -.email_attribute_cron { - background-color: #cdcdcd; - padding: 1px 2px; - color: #666666; -} -.email_attribute_mailing_list { - background-color: #99ff00; - padding: 1px 2px; - color: #666666; -} -.email_attribute_junk { - background-color: #222222; - color: #666666; - padding: 1px 2px; -} - -.email_content th { - text-align: left; -} diff --git a/app/views/emails/_email.html.erb b/app/views/emails/_email.html.erb index a1c616b..0d861a2 100644 --- a/app/views/emails/_email.html.erb +++ b/app/views/emails/_email.html.erb @@ -6,66 +6,66 @@
Date | +Date | <%= email.date %> | |||||||
---|---|---|---|---|---|---|---|---|---|
From | +From | <%= email.from.join(', ') %> | |||||||
To | +To | <%= email.to.join(', ') %> | |||||||
Delivered-To | +Delivered-To | <%= email.delivered_to.join(', ') %> | |||||||
Subject | +Subject | <%= email.subject %> | |||||||
Clients | +Clients | <% email.organisations.presence.each do |organisation| %> - <%= organisation %> + <%= organisation %> <% end %> | |||||||
Servers | +Servers | <% email.servers.presence.each do |server| %> - <%= server %> + <%= server %> <% end %> | |||||||
Issues | +Issues | <% email.issues.presence.each do |issue| %> - <%= issue %> + <%= issue %> <% end %> | |||||||
From Cron | +From Cron | - "><%= email.cron? ? "Yes" : "No" %> + "><%= email.cron? ? "Yes" : "No" %> | |||||||
<%= header["name"] %> | +<%= header["name"] %> | <%= header["value"] %> |
Date | -From | -Subject | -Metadata | -Show, Edit, Destroy | +Date | +From | +Subject | +Metadata | +Actions |
---|---|---|---|---|---|---|---|---|---|
<%= email.date.strftime("%Y-%m-%d %H:%M") %> | -<%= link_to email.from.join(', '), email, "data-turbo-frame": "_top" %> | -<%= link_to email.subject, email, "data-turbo-frame": "_top" %> | +<%= link_to email.date.strftime("%Y-%m-%d %H:%M"), email, "data-turbo-frame": "_top", class: "block p-2" %> | +<%= link_to email.from.join(', '), email, "data-turbo-frame": "_top", class: "block p-2" %> | +<%= link_to email.subject, email, "data-turbo-frame": "_top", class: "block p-2" %> | <% email.organisations.each do |organisation| %> - <%= organisation %> + <%= organisation %> <% end if email.organisations %> <% email.servers.each do |server| %> - <%= server %> + <%= server %> <% end if email.servers %> <% if email.cron? %> - cron + cron <% end %> <% if email.mailing_list? %> - list + list <% end %> <% if email.junk? %> - junk + junk <% end %> | -+ | <%= 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" %> |