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

pull/9675/head
Henriette Darge 3 years ago
parent 7542435e25
commit f14ef3d0aa
  1. 46
      app/views/digest_mailer/work_packages.html.erb
  2. 42
      app/views/mailer/_notification_row.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">

@ -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>

Loading…
Cancel
Save