<%= digest_timespan_text %>
<% @notifications_by_project.each do |project, notifications_by_work_package| %>

<%= link_to_project(project, only_path: false) %>

<% notifications_by_work_package.each do |work_package, notifications| %>

<%= link_to_work_package work_package, status: true, only_path: false %>

<% notifications.sort_by(&:created_at).each do |notification| %>
<%= digest_notification_timestamp_text(notification) %> <%= I18n.t( :"mail.digests.work_packages.reason.#{notification.reason_mail_digest || :unknown}", default: '-') %>
<% journal = notification.journal %>
<%= format_text(journal.notes, only_path: false, object: notification.resource, project: notification.project) %> <% if journal.notes.present? && journal.details.any? %>
<% end %>
    <% journal.details.each do |detail| %>
  • <%= journal.render_detail(detail, only_path: false) %>
  • <% end %>
<% end %>
<% end %>
<% end %>