OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/app/views/digest_mailer/work_packages.html.erb

74 lines
2.8 KiB

<%= render partial: 'mailer/notification_mailer_header',
locals: {
summary: "#{I18n.t(:'mail.digests.you_have')} #{digest_summary_text(@notification_ids.length, @mentioned_count)}"
} %>
<% @aggregated_notifications.first(DigestMailer::MAX_SHOWN_WORK_PACKAGES).each do | work_package, notifications_by_work_package| %>
<%= render layout: 'mailer/notification_row',
locals: {
work_package: work_package,
notifications_by_work_package: notifications_by_work_package
} do %>
<table <%= placeholder_table_styles %>>
<% notifications_by_work_package.each do | notification | %>
<% if notification.journal.notes.present? %>
<tr>
<td style="color: #878787; line-height: 24px; font-size: 14px;">
<%= digest_comment_text(notification) %>
<%= digest_notification_timestamp_text(notification) %>
</td>
</tr>
<% end %>
<% notification.journal.details.each do |detail| %>
<tr>
<td style="color: #878787; line-height: 24px; font-size: 14px;">
<%= notification.journal.render_detail(detail, only_path: false) %>
<%= digest_notification_timestamp_text(notification) %>
</td>
</tr>
<% end %>
<% end %>
</table>
<% end %>
<% end %>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin: 30px 0;">
<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>
<td width="20%" style="text-align: right">
<%= render partial: 'mailer/notification_settings_button' %>
</td>
</tr>
</table>