Files
fizzy/app/views/mailers/notification/bundle_mailer/notification.text.erb
T
Mike Dalessio 8c5b47d774 Group notification emails by board (#2506)
* Group notification emails by board

Notification bundle emails now group items by board instead of
showing the board name redundantly for each card. Each board
section has a linked header and an <hr> separator.

* Adjust board title styles and remove rem units

* Sort board groups alphabetically

Sort notification email board sections alphabetically by name
(case-insensitive).

Also, rewrite mailer tests to use Nokogiri::HTML5 for precise DOM
assertions instead of regex matching.

---------

Co-authored-by: Andy Smith <andy@37signals.com>
2026-02-09 11:29:11 -05:00

23 lines
971 B
Plaintext

Notifications since <%= @bundle.starts_at.strftime("%-l%P on %A, %B %-d") %>
You have <%= pluralize @notifications.count, "new notification" %><%= " in #{ Current.account.name }" if @user.identity.accounts.many? %>.
<% @notifications.group_by { |n| n.card.board }.sort_by { |board, _| board.name.downcase }.each do |board, board_notifications| %>
<%= board.name %>
<%= "-" * board.name.length %>
<% board_notifications.group_by(&:card).each do |card, notifications| %>
<%= "##{ card.number } #{ card.title }" %>
<%= render partial: "notification/bundle_mailer/notification", collection: notifications, as: :notification %>
<% end %>
<% end %>
--------------------------------------------------------------------------------
Fizzy emails you about new notifications every few hours.
Change how often you get these:
<%= notifications_settings_url %>
Unsubscribe from all email notifications:
<%= new_notifications_unsubscribe_url(access_token: @unsubscribe_token) %>