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

Wrap buttons in their own tables so that they can grow in height without any weird overlappings

Henriette Darge8ad48e447cb1
diff --git a/app/views/digest_mailer/work_packages.html.erb b/app/views/digest_mailer/work_packages.html.erb
index 3fad9b23dee..462130cbdf3 100644
--- a/app/views/digest_mailer/work_packages.html.erb
+++ b/app/views/digest_mailer/work_packages.html.erb
@@ -49,18 +49,17 @@
</td>
<%= placeholder_cell('10px', vertical: true) %>
<td>
- <a href="<%= notifications_center_url %>"
- target="_blank"
- style="background-color: #D1E5F5;
- padding: 8px 12px;
- color: #1A67A3;
- border: 1px solid #1A67A3;
- border-radius: 16px;
- text-decoration: none;
- font-size:14px;
- white-space: nowrap;">
- <%= I18n.t(:'mail.work_packages.see_all') %>
- </a>
+ <table <%= placeholder_table_styles %>>
+ <tr>
+ <td style="background: #D1E5F5; padding: 8px 12px; border: 1px solid #1A67A3; border-radius: 16px; overflow: hidden; text-overflow: ellipsis;">
+ <a href="<%= notifications_center_url %>"
+ target="_blank"
+ style="color: #1A67A3; text-decoration: none; font-size: 14px;white-space: nowrap;">
+ <%= I18n.t(:'mail.work_packages.see_all') %>
+ </a>
+ </td>
+ </tr>
+ </table>
</td>
</tr>
</table>
diff --git a/app/views/mailer/_notification_mailer_header.html.erb b/app/views/mailer/_notification_mailer_header.html.erb
index 0c2fe2a1d92..45b02bbf6f2 100644
--- a/app/views/mailer/_notification_mailer_header.html.erb
+++ b/app/views/mailer/_notification_mailer_header.html.erb
@@ -28,11 +28,17 @@
<% if defined?(button_href) && defined?(button_text) %>
<tr>
<td>
- <a href="<%= button_href %>"
- target="_blank"
- style="background: #D1E5F5; padding: 8px 12px; color: #1A67A3; border: 1px solid #1A67A3; border-radius: 16px; text-decoration: none; font-size: 14px;">
- <%= button_text %>
- </a>
+ <table <%= placeholder_table_styles %>>
+ <tr>
+ <td style="background: #D1E5F5; padding: 8px 12px; border: 1px solid #1A67A3; border-radius: 16px; overflow: hidden; text-overflow: ellipsis;">
+ <a href="<%= button_href %>"
+ target="_blank"
+ style="color: #1A67A3; text-decoration: none; font-size: 14px;">
+ <%= button_text %>
+ </a>
+ </td>
+ </tr>
+ </table>
</td>
</tr>
<% end %>
@@ -46,7 +52,7 @@
<table <%= placeholder_table_styles %>>
<tr>
<td style="width: 96px; height: 96px;">
- <%= logo_tag(alt: "#{Setting.app_title} #{I18n.t(:'mail.logo_alt_text')}", style: "height: 96px;max-width: 240px;") %>
+ <%= logo_tag(alt: "#{Setting.app_title} #{I18n.t(:'mail.logo_alt_text')}", style: "width: 96px;max-width: 240px;max-height: 96px;") %>
</td>
</tr>
</table>
diff --git a/app/views/mailer/_notification_settings_button.html.erb b/app/views/mailer/_notification_settings_button.html.erb
index d3b6f17ddd7..39566ee77e2 100644
--- a/app/views/mailer/_notification_settings_button.html.erb
+++ b/app/views/mailer/_notification_settings_button.html.erb
@@ -1,5 +1,11 @@
-<a href="<%= my_reminders_url %>"
- target="_blank"
- style="padding: 8px 12px; color: #333333; border: 1px solid #878787; border-radius: 16px; text-decoration: none; white-space: nowrap;">
- <%= I18n.t(:'mail.notification.settings') %>
-</a>
\ No newline at end of file
+<table <%= placeholder_table_styles %>>
+ <tr>
+ <td style="padding: 8px 12px; border: 1px solid #878787; border-radius: 16px; overflow: hidden; text-overflow: ellipsis;white-space: nowrap;">
+ <a href="<%= my_reminders_url %>"
+ target="_blank"
+ style="color: #333333; text-decoration: none; font-size: 14px;white-space: nowrap;">
+ <%= I18n.t(:'mail.notification.settings') %>
+ </a>
+ </td>
+ </tr>
+</table>