Merge pull request #8577 from demarches-simplifiees/add-services-public-plus-in-emails
ETQ usager, je peux donner mon avis sur "services publics +" depuis un mail reçu une fois mon dossier traité
This commit is contained in:
commit
4b480de9b7
5 changed files with 29 additions and 0 deletions
BIN
app/assets/images/mailer/logo-services-plus.png
Normal file
BIN
app/assets/images/mailer/logo-services-plus.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -9,6 +9,7 @@ class NotificationMailer < ApplicationMailer
|
|||
include ActionView::Helpers::SanitizeHelper
|
||||
|
||||
before_action :set_dossier
|
||||
before_action :set_services_publics_plus, only: :send_notification
|
||||
after_action :create_commentaire_for_notification
|
||||
|
||||
helper ServiceHelper
|
||||
|
@ -50,6 +51,12 @@ class NotificationMailer < ApplicationMailer
|
|||
|
||||
private
|
||||
|
||||
def set_services_publics_plus
|
||||
return unless Dossier::TERMINE.include?(params[:state])
|
||||
|
||||
@services_publics_plus_url = ENV['SERVICES_PUBLICS_PLUS_URL'].presence
|
||||
end
|
||||
|
||||
def set_dossier
|
||||
@dossier = params[:dossier]
|
||||
|
||||
|
|
16
app/views/layouts/mailers/_services_publics_plus.html.haml
Normal file
16
app/views/layouts/mailers/_services_publics_plus.html.haml
Normal file
|
@ -0,0 +1,16 @@
|
|||
= vertical_margin(20)
|
||||
|
||||
%div{ style: 'background-color: #F5F5FE; padding: 20px;' }
|
||||
%table{ width: "100%", border: "0", cellspacing: "0", cellpadding: "0" }
|
||||
%tr
|
||||
%td{ width: "70%", valign: "top", align: "center" }
|
||||
%p{ style: 'margin: 0' }
|
||||
J’aide les services publics à s’améliorer :
|
||||
%br
|
||||
= link_to 'Je donne mon avis avec Services Publics +', @services_publics_plus_url, target: '_blank', rel: 'noopener noreferrer'
|
||||
|
||||
%td{ width: "30%" }
|
||||
= link_to @services_publics_plus_url, target: '_blank', rel: 'noopener noreferrer' do
|
||||
= image_tag('mailer/logo-services-plus.png', height: 39, width: 121, style: 'display:block; vertical-align: middle', alt: "Services Publics +")
|
||||
|
||||
= vertical_margin(20)
|
|
@ -6,5 +6,8 @@
|
|||
- if @actions.present?
|
||||
= render 'notification_mailer/actions', actions: @actions, dossier: @dossier
|
||||
|
||||
- if @services_publics_plus_url.present?
|
||||
= render 'layouts/mailers/services_publics_plus'
|
||||
|
||||
- content_for :footer do
|
||||
= render 'layouts/mailers/service_footer', service: @service, dossier: @dossier
|
||||
|
|
|
@ -163,3 +163,6 @@ DOLIST_LOGIN_URL="https://clientpreprod.dolist.net"
|
|||
SUPPORT_WEBHOOK_URL=""
|
||||
# rappel web de sendinblue
|
||||
SIB_WEBHOOK_URL=""
|
||||
|
||||
# ServicesPublics+ tracking url shown to user when dossier is terminated.
|
||||
SERVICES_PUBLICS_PLUS_URL=""
|
||||
|
|
Loading…
Reference in a new issue