emails: add a "Read message" button to the new answer email
This commit is contained in:
parent
630ae06542
commit
f88d7c28fa
4 changed files with 20 additions and 3 deletions
5
app/helpers/mailer_helper.rb
Normal file
5
app/helpers/mailer_helper.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
module MailerHelper
|
||||
def round_button(text, url)
|
||||
render 'shared/mailer_round_button', text: text, url: url
|
||||
end
|
||||
end
|
|
@ -1,6 +1,7 @@
|
|||
# Preview all emails at http://localhost:3000/rails/mailers/dossier_mailer
|
||||
class DossierMailer < ApplicationMailer
|
||||
helper ServiceHelper
|
||||
helper MailerHelper
|
||||
|
||||
layout 'mailers/layout'
|
||||
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
Bonjour,
|
||||
|
||||
%p
|
||||
Un nouveau message est disponible dans votre espace demarches-simplifiees.fr.
|
||||
L’administration en charge de votre dossier vous a
|
||||
%strong envoyé un nouveau message.
|
||||
|
||||
%p
|
||||
Pour le consulter, merci de vous rendre sur
|
||||
= link_to messagerie_dossier_url(@dossier), messagerie_dossier_url(@dossier), target: '_blank', rel:'noopener'
|
||||
Pour le consulter et y répondre, cliquez sur le bouton ci-dessous :
|
||||
|
||||
= round_button('Lire le message', messagerie_dossier_url(@dossier))
|
||||
|
||||
= render partial: "layouts/mailers/signature", locals: { service: @service }
|
||||
|
|
9
app/views/shared/_mailer_round_button.html.haml
Normal file
9
app/views/shared/_mailer_round_button.html.haml
Normal file
|
@ -0,0 +1,9 @@
|
|||
/# From https://litmus.com/blog/a-guide-to-bulletproof-buttons-in-email-design
|
||||
%table{ width: "100%", border: "0", cellspacing:"0", cellpadding:"0" }
|
||||
%tr
|
||||
%td
|
||||
%table{ border:"0", cellspacing:"0", cellpadding:"0", style:"margin: auto" }
|
||||
%tr
|
||||
%td{ align:"center", style:"border-radius: 5px;", bgcolor:"#0069cc" }
|
||||
%a{ href: url, target:"_blank", style:"font-size: 16px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; text-decoration: none; border-radius: 5px; padding: 12px 25px; border: 1px solid #0069cc; display: inline-block;" }
|
||||
= text
|
Loading…
Reference in a new issue