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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Apply strict table layout on daily notification mail footer element to be more bullet proof for various clients
Henriette Darge7db63e911d15
diff --git a/app/views/digest_mailer/work_packages.html.erb b/app/views/digest_mailer/work_packages.html.erbindex 03d0854a5cb..17170c883a4 100644--- a/app/views/digest_mailer/work_packages.html.erb+++ b/app/views/digest_mailer/work_packages.html.erb@@ -32,42 +32,50 @@<% end %><% end %>-<table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin: 30px 0;">+<table <%= placeholder_table_styles(style: 'font-size:14px;') %>><tr>- <td width="80%">- <% if @aggregated_notifications.length > DigestMailer::MAX_SHOWN_WORK_PACKAGES %>- <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>+ <table <%= placeholder_table_styles(style: 'width:100%;') %>>+ <tr>+ <td>+ <table>+ <tr>+ <td>+ <span>+ <% number_of_overflowing_work_packages = @aggregated_notifications.length - DigestMailer::MAX_SHOWN_WORK_PACKAGES %>+ <% count = number_of_overflowing_work_packages === 1 ? 'one' : 'other' %>+ <%= I18n.t(:"mail.digests.work_packages.more_to_see.#{count}", count: number_of_overflowing_work_packages) %>+ </span>+ </td>+ <%= placeholder_cell('10px', true) %>+ <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>+ </td>+ </tr>+ </table></td>- <td width="20%" style="text-align: right">+ <%= placeholder_cell('10px', true) %>+ <td><%= render partial: 'mailer/notification_settings_button' %></td></tr></table>+<table>+ <tr>+ <%= placeholder_cell('20px') %>+ </tr>+</table>\ No newline at end of filediff --git a/app/views/digest_mailer/work_packages.text.erb b/app/views/digest_mailer/work_packages.text.erbindex 3bcb4135a93..860cbb0b672 100644--- a/app/views/digest_mailer/work_packages.text.erb+++ b/app/views/digest_mailer/work_packages.text.erb@@ -35,9 +35,6 @@<% if @aggregated_notifications.length > DigestMailer::MAX_SHOWN_WORK_PACKAGES %><% 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') %> <%= I18n.t(:'mail.digests.work_packages.login_to_see_all') %>-<% else %>-<%= I18n.t(:'mail.digests.work_packages.more_to_see_plural', number: number_of_overflowing_work_packages) %> <%= I18n.t(:'mail.digests.work_packages.login_to_see_all') %>-<% end %>+<% count = number_of_overflowing_work_packages === 1 ? 'one' : 'other' %>+<%= I18n.t(:"mail.digests.work_packages.more_to_see.#{count}", count: number_of_overflowing_work_packages) %><% end %>diff --git a/app/views/mailer/_notification_mailer_header.html.erb b/app/views/mailer/_notification_mailer_header.html.erbindex 6813e8d61ba..b0c06a67fd3 100644--- a/app/views/mailer/_notification_mailer_header.html.erb+++ b/app/views/mailer/_notification_mailer_header.html.erb@@ -30,7 +30,7 @@<td><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;">+ style="background: #D1E5F5; padding: 8px 12px; color: #1A67A3; border: 1px solid #1A67A3; border-radius: 16px; text-decoration: none;font-size: 14px;"><%= I18n.t(:'mail.notification.center') %></a></td>diff --git a/config/locales/en.yml b/config/locales/en.ymlindex 62534df3420..d5686d9fde2 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -1981,8 +1981,9 @@ en:created_at: 'at %{timestamp} by %{user} 'login_to_see_all: 'Log in to see all notifications.'mentioned: 'You have been <b>mentioned in a comment</b>'- more_to_see_singular: 'There is 1 more work package with notifications.'- more_to_see_plural: 'There are %{number} more work packages with notifications.'+ more_to_see:+ one: 'There is 1 more work package with notifications.'+ other: 'There are %{count} more work packages with notifications.'reason:watched: 'Watched'involved: 'Assigned or responsible'