mailers: add CTA to templated emails
This commit is contained in:
parent
6195ee41f3
commit
8313752663
6 changed files with 37 additions and 0 deletions
13
app/views/notification_mailer/_actions.html.haml
Normal file
13
app/views/notification_mailer/_actions.html.haml
Normal file
|
@ -0,0 +1,13 @@
|
|||
= vertical_margin(15)
|
||||
|
||||
- actions.each_with_index do |action, index|
|
||||
- variant = (index == 0 ? :primary : :secondary)
|
||||
- case action
|
||||
- when MailTemplateConcern::Actions::SHOW
|
||||
= round_button('Consulter mon dossier', dossier_url(@dossier), variant)
|
||||
- when MailTemplateConcern::Actions::ASK_QUESTION
|
||||
= round_button('J’ai une question', messagerie_dossier_url(@dossier), variant)
|
||||
- when MailTemplateConcern::Actions::REPLY
|
||||
= round_button('Répondre à ce message', messagerie_dossier_url(@dossier), variant)
|
||||
|
||||
= vertical_margin(8)
|
|
@ -3,5 +3,8 @@
|
|||
|
||||
= @rendered_template
|
||||
|
||||
- if @actions.present?
|
||||
= render 'notification_mailer/actions', actions: @actions, dossier: @dossier
|
||||
|
||||
- content_for :footer do
|
||||
= render 'layouts/mailers/service_footer', service: @service, dossier: @dossier
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue