change avis invitation mailer
This commit is contained in:
parent
c55e4d0d98
commit
e79b1204e0
2 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ class AvisMailer < ApplicationMailer
|
|||
|
||||
def avis_invitation(avis)
|
||||
@avis = avis
|
||||
email = @avis.instructeur&.email || @avis.email
|
||||
email = @avis.expert&.email
|
||||
subject = "Donnez votre avis sur le dossier nº #{@avis.dossier.id} (#{@avis.dossier.procedure.libelle})"
|
||||
|
||||
mail(to: email, subject: subject)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- content_for(:title, 'Invitation à donner votre avis')
|
||||
- avis_link = @avis.instructeur.present? ? instructeur_avis_url(@avis.procedure, @avis) : sign_up_instructeur_avis_url(@avis.procedure, @avis.id, @avis.email)
|
||||
- avis_link = @avis.expert.user.active?.present? ? expert_avis_url(@avis.procedure, @avis) : sign_up_expert_avis_url(@avis.procedure, @avis.id, @avis.expert.email)
|
||||
|
||||
- content_for(:footer) do
|
||||
Merci de ne pas répondre à cet email. Donnez votre avis
|
||||
|
@ -23,7 +23,7 @@
|
|||
%p{ style: "padding: 8px; color: #333333; background-color: #EEEEEE; font-size: 14px;" }
|
||||
= @avis.introduction
|
||||
|
||||
- if @avis.instructeur.present?
|
||||
- if @avis.expert.user.active?.present?
|
||||
%p
|
||||
= round_button("Donner votre avis", avis_link, :primary)
|
||||
- else
|
||||
|
|
Loading…
Reference in a new issue