Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Adjust spacings and alignment in daily email

Henriette Darge3dede40fe5b6
diff --git a/app/views/digest_mailer/work_packages.html.erb b/app/views/digest_mailer/work_packages.html.erb
index c5ea948feba..1ad0b2bbabc 100644
--- a/app/views/digest_mailer/work_packages.html.erb
+++ b/app/views/digest_mailer/work_packages.html.erb
@@ -12,7 +12,7 @@
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="font-size: 12px;">
<% notifications_by_work_package.each do | notification | %>
<% if notification.journal.notes.present? %>
- <tr style="color: #878787; line-height: 20px; white-space: nowrap;">
+ <tr style="color: #878787; line-height: 20px; white-space: nowrap; font-size: 12px;">
<td>
<%= digest_comment_text(notification) %>
<%= digest_notification_timestamp_text(notification) %>
@@ -20,7 +20,7 @@
</tr>
<% end %>
<% notification.journal.details.each do |detail| %>
- <tr style="color: #878787; line-height: 20px; white-space: nowrap;">
+ <tr style="color: #878787; line-height: 20px; font-size: 12px;">
<td>
<%= notification.journal.render_detail(detail, only_path: false) %>
<%= digest_notification_timestamp_text(notification) %>
@@ -36,7 +36,7 @@
<tr>
<td width="100%">
<% if @aggregated_notifications.length > DigestMailer::MAX_SHOWN_WORK_PACKAGES %>
- <span>
+ <span style="line-height: 25px">
<% number_of_overflowing_work_packages = @aggregated_notifications.length - DigestMailer::MAX_SHOWN_WORK_PACKAGES %>
<% if number_of_overflowing_work_packages === 1 %>
<%= I18n.t(:'mail.digests.work_packages.more_to_see_singular') %>
diff --git a/app/views/digest_mailer/work_packages.text.erb b/app/views/digest_mailer/work_packages.text.erb
index 4f60246ba4a..089a332c9f1 100644
--- a/app/views/digest_mailer/work_packages.text.erb
+++ b/app/views/digest_mailer/work_packages.text.erb
@@ -1,4 +1,4 @@
-<%= I18n.t(:'mail.digests.salutation', user: @user.firstname) %>
+<%= I18n.t(:'mail.salutation', user: @user.firstname) %>
<%= digest_summary_text(@notification_ids.length, @aggregated_notifications.length) %>
<%= "-" * 100 %>
diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb
index 117a987cf11..213fb1d3695 100644
--- a/app/views/layouts/mailer.html.erb
+++ b/app/views/layouts/mailer.html.erb
@@ -30,8 +30,8 @@ See COPYRIGHT and LICENSE files for more details.
<head>
<style>
:root {
- color-scheme: light dark;
- supported-color-schemes: light dark;
+ color-scheme: light;
+ supported-color-schemes: light;
}
body {
diff --git a/app/views/mailer/_notification_mailer_header.html.erb b/app/views/mailer/_notification_mailer_header.html.erb
index 459951821c9..aab70eb6378 100644
--- a/app/views/mailer/_notification_mailer_header.html.erb
+++ b/app/views/mailer/_notification_mailer_header.html.erb
@@ -1,9 +1,9 @@
-<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-bottom: 1px solid #cccccc; margin-bottom: 30px;">
+<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-bottom: 1px solid #cccccc; margin-bottom: 32px;">
<tr>
<td style="width: 82px; height: 82px; vertical-align: top;">
<%= email_image_tag("logo_openproject_narrow.svg", alt: I18n.t(:'mail.logo_alt_text')) %>
</td>
- <td width="100%" style="padding-top: 8px;">
+ <td width="100%" style="padding-top: 8px; padding-left: 12px;">
<table>
<tr>
<td style="font-size: 24px; color: #333333; padding-bottom: 5px;">
@@ -16,7 +16,7 @@
</td>
</tr>
<tr>
- <td style="padding: 10px 0 25px 0;">
+ <td style="padding: 10px 0 32px 0;">
<a href="<%= notifications_center_url %>"
target="_blank"
style="background: #D1E5F5; padding: 8px 12px; color: #1A67A3; border: 1px solid #1A67A3; border-radius: 16px; text-decoration: none;">
diff --git a/app/views/mailer/_notification_row.html.erb b/app/views/mailer/_notification_row.html.erb
index 8db6e76d7db..bbe65250004 100644
--- a/app/views/mailer/_notification_row.html.erb
+++ b/app/views/mailer/_notification_row.html.erb
@@ -1,12 +1,12 @@
<a style="border: 1px solid #E0E0E0;
- margin-bottom: 15px;
- padding: 12px;
+ margin-bottom: 16px;
+ padding: 12px 12px 16px 12px;
border-radius: 10px;
text-decoration: none;
display: block;"
href="<%= notifications_path(work_package.id) %>"
target="_blank">
- <table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-bottom: 10px; font-size: 12px;">
+ <table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-bottom: 9px; font-size: 12px;">
<tr>
<td style="color: #333333;
background-color: #FFFFFF;
@@ -15,17 +15,21 @@
padding: 0 5px;">
<%= work_package.status %>
</td>
- <td style="padding-left: 5px;
- color: #878787;">
+ <td style="padding-left: 8px;
+ font-weight: bold;
+ color: #878787;
+ white-space: nowrap;">
#<%= work_package.id %>
</td>
<td style="white-space: nowrap;
padding-left: 5px;
- color: #878787;">
+ color: #878787;
+ font-weight: bold;">
- <%= work_package.project %>
</td>
<td style="padding-left: 5px;
color: #878787;
+ font-weight: bold;
white-space: nowrap;">
<% unique_reasons = unique_reasons_of_notifications(notifications_by_work_package) %>
<%= ' - ' unless unique_reasons.length === 1 && unique_reasons.first.nil? %>
@@ -46,9 +50,10 @@
</td>
</tr>
</table>
- <table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-bottom: 10px; font-size: 14px; font-weight: bold;">
+ <table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-bottom: 9px; font-size: 14px; font-weight: bold;">
<tr>
- <td style="color: <%= type_color(work_package.type, '#333333') %>;">
+ <td style="color: <%= type_color(work_package.type, '#333333') %>;
+ white-space: nowrap;">
<%= work_package.type.to_s.upcase %>
</td>
<td width="100%" style="padding-left: 5px; color: #333333;">