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 @@ - + - + - + - + - + <% if email.organisations.present? %> - + <% end %> <% if email.servers.present? %> - + <% end %> <% if email.issues.present? %> - + <% end %> - + <% email.headers.each do |header| %> - + <% end %> diff --git a/app/views/emails/_list.html.erb b/app/views/emails/_list.html.erb index 0e5f0e6..4e796b2 100644 --- a/app/views/emails/_list.html.erb +++ b/app/views/emails/_list.html.erb @@ -3,11 +3,11 @@
Date <%= email.date %>
From <%= email.from.join(', ') %>
To <%= email.to.join(', ') %>
Delivered-To <%= email.delivered_to.join(', ') %>
Subject <%= email.subject %>
Clients <% email.organisations.presence.each do |organisation| %> - + <%= organisation %> <% end %>
Servers <% email.servers.presence.each do |server| %> - + <%= server %> <% end %>
Issues <% email.issues.presence.each do |issue| %> - + <%= issue %> <% end %>
From Cron - "><%= email.cron? ? "Yes" : "No" %> + "><%= email.cron? ? "Yes" : "No" %>
- - - - - + + + + + diff --git a/app/views/emails/_list_row.html.erb b/app/views/emails/_list_row.html.erb index 674c31e..f8b4d89 100644 --- a/app/views/emails/_list_row.html.erb +++ b/app/views/emails/_list_row.html.erb @@ -1,25 +1,25 @@ - - - + + + -
DateFromSubjectMetadataShow, Edit, DestroyDateFromSubjectMetadataActions
<%= 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 %> <% end if email.organisations %> <% email.servers.each do |server| %> - + <%= server %> <% end if email.servers %> <% if email.cron? %> - + cron <% end %> <% if email.mailing_list? %> - + list <% end %> <% if email.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" %>