<%= I18n.t(:'mail.salutation', user: @user.firstname) %> <%= "#{I18n.t(:'mail.digests.you_have')} #{digest_summary_text(@notification_ids.length, @mentioned_count)}" %> <%= "-" * 100 %> <% @aggregated_notifications.first(DigestMailer::MAX_SHOWN_WORK_PACKAGES).each do | work_package, notifications_by_work_package| %> <%= "=" * (('# ' + work_package.id.to_s + work_package.subject).length + 4) %> = #<%= work_package.id %> <%= work_package.subject %> = <%= "=" * (('# ' + work_package.id.to_s + work_package.subject).length + 4) %> <% notifications_by_work_package.each do | notification | %> <%= "-" * 20 %> <% unique_reasons = unique_reasons_of_notifications(notifications_by_work_package) %> <%= digest_notification_timestamp_text( notification, html: false, extended_text: true) %> (<% unique_reasons.each_with_index do |reason, index| %><%= I18n.t(:"mail.digests.work_packages.reason.#{reason || :unknown}", default: '-') %><%= ', ' unless unique_reasons.size-1 == index %><% end %>) <% journal = notification.journal %> <% if journal.notes.present? %> <%= I18n.t(:label_comment_added) %>: <%= journal.notes %> <% end %> <% journal.details.each do |detail| %> * <%= journal.render_detail(detail, only_path: false, no_html: true) %> <% end %> <%= "-" * 20 %> <% end %> <% end %> <%= "-" * 100 %> <% if @aggregated_notifications.length > DigestMailer::MAX_SHOWN_WORK_PACKAGES %> <% 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) %> <% end %>