From 02194838dd64558cd974e68cb0bf800dffd25c91 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 16 Jan 2018 20:20:15 +0100 Subject: HTML e-mails for NotificationMailer (#6263) * HTML e-mails for NotificationMailer (except digest) * Add HTML template for digest * Fix build --- app/views/notification_mailer/digest.html.haml | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 app/views/notification_mailer/digest.html.haml (limited to 'app/views/notification_mailer/digest.html.haml') diff --git a/app/views/notification_mailer/digest.html.haml b/app/views/notification_mailer/digest.html.haml new file mode 100644 index 000000000..10e44f8dd --- /dev/null +++ b/app/views/notification_mailer/digest.html.haml @@ -0,0 +1,44 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.darker.hero-with-button + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %h1= t 'notification_mailer.digest.title' + %p.lead= t('notification_mailer.digest.body', since: l(@since.to_date, format: :short), instance: site_hostname) + %table.button{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.button-primary + = link_to web_url do + %span= t 'notification_mailer.digest.action' + +- @notifications.each_with_index do |n, i| + = render 'status', status: n.target_status, i: i + +- unless @follows_since.zero? + %table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start.border-top + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center + %p= t('notification_mailer.digest.new_followers_summary', count: @follows_since) -- cgit