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

Move status and counter into their own tables to be able to add paddings and make their height independent of the text between

Henriette Dargef14ef3d0aa85
diff --git a/app/views/digest_mailer/work_packages.html.erb b/app/views/digest_mailer/work_packages.html.erb
index ae407de451f..79bd7e57fe9 100644
--- a/app/views/digest_mailer/work_packages.html.erb
+++ b/app/views/digest_mailer/work_packages.html.erb
@@ -36,25 +36,33 @@
<tr>
<td width="80%">
<% if @aggregated_notifications.length > DigestMailer::MAX_SHOWN_WORK_PACKAGES %>
- <span style="font-size: 14px; line-height: 28px">
- <% 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') %>
- <% else %>
- <%= I18n.t(:'mail.digests.work_packages.more_to_see_plural', number: number_of_overflowing_work_packages) %>
- <% end %>
- </span>
- <a
- target="_blank"
- style="background-color: #D1E5F5;
- padding: 8px 12px;
- color: #1A67A3;
- border: 1px solid #1A67A3;
- border-radius: 16px;
- text-decoration: none;
- white-space: nowrap;">
- <%= I18n.t(:'mail.digests.work_packages.see_all') %>
- </a>
+ <table>
+ <tr>
+ <td>
+ <span style="font-size: 14px; line-height: 28px">
+ <% 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') %>
+ <% else %>
+ <%= I18n.t(:'mail.digests.work_packages.more_to_see_plural', number: number_of_overflowing_work_packages) %>
+ <% end %>
+ </span>
+ </td>
+ <td>
+ <a
+ target="_blank"
+ style="background-color: #D1E5F5;
+ padding: 8px 12px;
+ color: #1A67A3;
+ border: 1px solid #1A67A3;
+ border-radius: 16px;
+ text-decoration: none;
+ white-space: nowrap;">
+ <%= I18n.t(:'mail.digests.work_packages.see_all') %>
+ </a>
+ </td>
+ </tr>
+ </table>
<% end %>
</td>
<td width="20%" style="text-align: right">
diff --git a/app/views/mailer/_notification_row.html.erb b/app/views/mailer/_notification_row.html.erb
index 32c556a2b7e..9a922d235cd 100644
--- a/app/views/mailer/_notification_row.html.erb
+++ b/app/views/mailer/_notification_row.html.erb
@@ -9,15 +9,21 @@
target="_blank">
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-bottom: 9px; font-size: 14px;">
<tr>
- <td style="color: #333333;
- background-color: #FFFFFF;
- <%= status_colors(work_package.status) %>
- white-space: nowrap;
- padding: 2px 12px;
- height: 18px;">
- <%= work_package.status %>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td style="color: #333333;
+ background-color: #FFFFFF;
+ <%= status_colors(work_package.status) %>
+ white-space: nowrap;
+ padding: 2px 12px;
+ height: 18px;">
+ <%= work_package.status %>
+ </td>
+ </tr>
+ </table>
</td>
- <td width="100%" style="padding-left: 8px;
+ <td width="95%%" style="padding-left: 8px;
color: #878787;">
#<%= work_package.id %> - <%= work_package.project %>
@@ -29,13 +35,19 @@
default: '') %><%= ', ' unless unique_reasons.size-1 == index %>
<% end %>
</td>
- <td style="text-align: right;background-color: #00A3FF;
- color: white;
- border-radius: 8px;
- padding: 2px 8px;
- font-size: 14px;
- height: 18px;">
- <%= notifications_by_work_package.length %>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td style="background-color: #00A3FF;
+ color: white;
+ border-radius: 8px;
+ padding: 2px 8px;
+ font-size: 14px;
+ height: 18px;">
+ <%= notifications_by_work_package.length %>
+ </td>
+ </tr>
+ </table>
</td>
</tr>
</table>