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

remove paddings from non-table cells as much as possible

Henriette Darge7542435e250e
diff --git a/app/views/digest_mailer/work_packages.html.erb b/app/views/digest_mailer/work_packages.html.erb
index ffeadc3606c..ae407de451f 100644
--- a/app/views/digest_mailer/work_packages.html.erb
+++ b/app/views/digest_mailer/work_packages.html.erb
@@ -34,7 +34,7 @@
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin: 30px 0;">
<tr>
- <td width="100%">
+ <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 %>
@@ -57,7 +57,7 @@
</a>
<% end %>
</td>
- <td>
+ <td width="20%" style="text-align: right">
<%= render partial: 'mailer/notification_settings_button' %>
</td>
</tr>
diff --git a/app/views/mailer/_notification_mailer_header.html.erb b/app/views/mailer/_notification_mailer_header.html.erb
index 56dcd3416e5..b8aec4f2627 100644
--- a/app/views/mailer/_notification_mailer_header.html.erb
+++ b/app/views/mailer/_notification_mailer_header.html.erb
@@ -1,4 +1,4 @@
-<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-bottom: 1px solid #cccccc; margin-bottom: 32px;">
+<table width="100%" border="0" cellpadding="2px" cellspacing="0" style="border-bottom: 1px solid #cccccc; margin-bottom: 32px;">
<tr>
<td width="100%" style="padding-top: 8px; padding-left: 12px;">
<table>
diff --git a/app/views/mailer/_notification_row.html.erb b/app/views/mailer/_notification_row.html.erb
index 97554c930f2..32c556a2b7e 100644
--- a/app/views/mailer/_notification_row.html.erb
+++ b/app/views/mailer/_notification_row.html.erb
@@ -1,57 +1,61 @@
-<a style="border: 1px solid #E0E0E0;
- 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: 9px; font-size: 14px;">
- <tr>
- <td >
- <div style="color: #333333;
- background-color: #FFFFFF;
- <%= status_colors(work_package.status) %>
- white-space: nowrap;
- padding: 2px 12px;
- height: 16px;">
- <%= work_package.status %>
- </div>
- </td>
- <td width="100%" style="padding-left: 8px;
- color: #878787;">
+<table cellpadding="12px" width="100%" style="border: 1px solid #E0E0E0;
+ border-radius: 10px;">
+ <tr>
+ <td>
+ <a style="
+ 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: 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>
+ <td width="100%" style="padding-left: 8px;
+ color: #878787;">
- #<%= work_package.id %> - <%= work_package.project %>
- <% unique_reasons = unique_reasons_of_notifications(notifications_by_work_package) %>
- <%= ' - ' unless unique_reasons.length === 1 && unique_reasons.first.nil? %>
- <% unique_reasons.each_with_index do |reason, index| %>
- <%= I18n.t(
- :"mail.digests.work_packages.reason.#{reason || :unknown}",
- default: '') %><%= ', ' unless unique_reasons.size-1 == index %>
- <% end %>
- </td>
- <td style="text-align: right;">
- <span style="background-color: #00A3FF;
- color: white;
- border-radius: 8px;
- padding: 0px 8px;
- font-size: 14px;">
- <%= notifications_by_work_package.length %>
- </span>
- </td>
- </tr>
- </table>
- <table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-bottom: 9px; font-size: 16px; font-weight: bold;">
- <tr>
- <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;">
- <%= work_package.subject %>
- </td>
- </tr>
- </table>
+ #<%= work_package.id %> - <%= work_package.project %>
+ <% unique_reasons = unique_reasons_of_notifications(notifications_by_work_package) %>
+ <%= ' - ' unless unique_reasons.length === 1 && unique_reasons.first.nil? %>
+ <% unique_reasons.each_with_index do |reason, index| %>
+ <%= I18n.t(
+ :"mail.digests.work_packages.reason.#{reason || :unknown}",
+ 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>
+ </tr>
+ </table>
+ <table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-bottom: 9px; font-size: 16px; font-weight: bold;">
+ <tr>
+ <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;">
+ <%= work_package.subject %>
+ </td>
+ </tr>
+ </table>
- <%= yield %>
-</a>
\ No newline at end of file
+ <%= yield %>
+ </a>
+
+ </td>
+ </tr>
+</table>
+
+<br/>
\ No newline at end of file