Aggregate notifications by card
This commit is contained in:
@@ -2,7 +2,13 @@
|
||||
<td>
|
||||
<h1 class="title">Everything since <%= @bundle.starts_at.strftime("%-l%P on %A, %B %-d") %></h1>
|
||||
<p class="subtitle margin-block-end-double">You have <%= link_to pluralize(@notifications.count, "new notification"), notifications_url %>.</p>
|
||||
<%= render partial: "notification/bundle_mailer/notification", collection: @notifications, as: :notification %>
|
||||
|
||||
<% @notifications.group_by(&:card).each do |card, notifications| %>
|
||||
<h2 class="notification__board"><%= card.board.name %></h2>
|
||||
<%= link_to "##{ card.id } #{ card.title }", card, class: "card__title" %>
|
||||
<%= render partial: "notification/bundle_mailer/notification", collection: notifications, as: :notification %>
|
||||
<% end %>
|
||||
|
||||
<p class="footer">Fizzy emails you about new notifications every few hours. <br>
|
||||
<%= link_to "Change how often you get these", notifications_settings_url %>
|
||||
or <%= link_to "unsubscribe from all email notifications", new_notifications_unsubscribe_url(access_token: @unsubscribe_token) %>.
|
||||
|
||||
Reference in New Issue
Block a user