feat(i18n): send dossier emails with its user locale and improuve translations
This commit is contained in:
parent
cd9f7df502
commit
6a5a8233b5
18 changed files with 162 additions and 174 deletions
|
@ -5,61 +5,73 @@ class DossierMailer < ApplicationMailer
|
||||||
helper ProcedureHelper
|
helper ProcedureHelper
|
||||||
|
|
||||||
layout 'mailers/layout'
|
layout 'mailers/layout'
|
||||||
|
default from: NO_REPLY_EMAIL
|
||||||
|
|
||||||
def notify_new_draft(dossier)
|
def notify_new_draft(dossier)
|
||||||
@dossier = dossier
|
I18n.with_locale(dossier.user_locale) do
|
||||||
@service = dossier.procedure.service
|
@dossier = dossier
|
||||||
@logo_url = attach_logo(dossier.procedure)
|
@service = dossier.procedure.service
|
||||||
|
@logo_url = attach_logo(dossier.procedure)
|
||||||
|
@subject = default_i18n_subject(libelle_demarche: dossier.procedure.libelle)
|
||||||
|
|
||||||
subject = "Retrouvez votre brouillon pour la démarche « #{dossier.procedure.libelle} »"
|
mail(to: dossier.user_email_for(:notification), subject: @subject) do |format|
|
||||||
|
format.html { render layout: 'mailers/notifications_layout' }
|
||||||
mail(from: NO_REPLY_EMAIL, to: dossier.user_email_for(:notification), subject: subject) do |format|
|
end
|
||||||
format.html { render layout: 'mailers/notifications_layout' }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_new_answer(dossier, body = nil)
|
def notify_new_answer(dossier, body = nil)
|
||||||
@dossier = dossier
|
I18n.with_locale(dossier.user_locale) do
|
||||||
@service = dossier.procedure.service
|
@dossier = dossier
|
||||||
@logo_url = attach_logo(dossier.procedure)
|
@service = dossier.procedure.service
|
||||||
@body = body
|
@logo_url = attach_logo(dossier.procedure)
|
||||||
|
@body = body
|
||||||
|
@subject = default_i18n_subject(dossier_id: dossier.id, libelle_demarche: dossier.procedure.libelle)
|
||||||
|
|
||||||
subject = "Nouveau message pour votre dossier nº #{dossier.id} (#{dossier.procedure.libelle})"
|
mail(to: dossier.user_email_for(:notification), subject: @subject) do |format|
|
||||||
|
format.html { render layout: 'mailers/notifications_layout' }
|
||||||
mail(from: NO_REPLY_EMAIL, to: dossier.user_email_for(:notification), subject: subject) do |format|
|
end
|
||||||
format.html { render layout: 'mailers/notifications_layout' }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_new_commentaire_to_instructeur(dossier, instructeur_email)
|
def notify_new_commentaire_to_instructeur(dossier, instructeur_email)
|
||||||
@dossier = dossier
|
I18n.with_locale(dossier.user_locale) do
|
||||||
@subject = default_i18n_subject(dossier_id: dossier.id, libelle_demarche: dossier.procedure.libelle)
|
@dossier = dossier
|
||||||
mail(from: NO_REPLY_EMAIL, to: instructeur_email, subject: @subject)
|
@subject = default_i18n_subject(dossier_id: dossier.id, libelle_demarche: dossier.procedure.libelle)
|
||||||
|
|
||||||
|
mail(to: instructeur_email, subject: @subject)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_new_dossier_depose_to_instructeur(dossier, instructeur_email)
|
def notify_new_dossier_depose_to_instructeur(dossier, instructeur_email)
|
||||||
@dossier = dossier
|
I18n.with_locale(dossier.user_locale) do
|
||||||
@subject = default_i18n_subject(dossier_id: dossier.id, libelle_demarche: dossier.procedure.libelle)
|
@dossier = dossier
|
||||||
mail(from: NO_REPLY_EMAIL, to: instructeur_email, subject: @subject)
|
@subject = default_i18n_subject(dossier_id: dossier.id, libelle_demarche: dossier.procedure.libelle)
|
||||||
|
|
||||||
|
mail(to: instructeur_email, subject: @subject)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_revert_to_instruction(dossier)
|
def notify_revert_to_instruction(dossier)
|
||||||
@dossier = dossier
|
I18n.with_locale(dossier.user_locale) do
|
||||||
@service = dossier.procedure.service
|
@dossier = dossier
|
||||||
@logo_url = attach_logo(dossier.procedure)
|
@service = dossier.procedure.service
|
||||||
|
@logo_url = attach_logo(dossier.procedure)
|
||||||
|
@subject = default_i18n_subject(dossier_id: dossier.id, libelle_demarche: dossier.procedure.libelle)
|
||||||
|
|
||||||
subject = "Votre dossier nº #{@dossier.id} est en train d’être réexaminé"
|
mail(to: dossier.user_email_for(:notification), subject: @subject) do |format|
|
||||||
|
format.html { render layout: 'mailers/notifications_layout' }
|
||||||
mail(from: NO_REPLY_EMAIL, to: dossier.user_email_for(:notification), subject: subject) do |format|
|
end
|
||||||
format.html { render layout: 'mailers/notifications_layout' }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_brouillon_near_deletion(dossiers, to_email)
|
def notify_brouillon_near_deletion(dossiers, to_email)
|
||||||
@subject = default_i18n_subject(count: dossiers.count)
|
I18n.with_locale(dossiers.first.user_locale) do
|
||||||
@dossiers = dossiers
|
@subject = default_i18n_subject(count: dossiers.count)
|
||||||
|
@dossiers = dossiers
|
||||||
|
|
||||||
mail(to: to_email, subject: @subject)
|
mail(to: to_email, subject: @subject)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_brouillon_deletion(dossier_hashes, to_email)
|
def notify_brouillon_deletion(dossier_hashes, to_email)
|
||||||
|
@ -70,24 +82,21 @@ class DossierMailer < ApplicationMailer
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_deletion_to_user(deleted_dossier, to_email)
|
def notify_deletion_to_user(deleted_dossier, to_email)
|
||||||
@subject = default_i18n_subject(dossier_id: deleted_dossier.dossier_id)
|
I18n.with_locale(deleted_dossier.user_locale) do
|
||||||
@deleted_dossier = deleted_dossier
|
@subject = default_i18n_subject(dossier_id: deleted_dossier.dossier_id)
|
||||||
|
@deleted_dossier = deleted_dossier
|
||||||
|
|
||||||
mail(to: to_email, subject: @subject)
|
mail(to: to_email, subject: @subject)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_instructeur_deletion_to_user(deleted_dossier, to_email)
|
def notify_instructeur_deletion_to_user(deleted_dossier, to_email)
|
||||||
@subject = default_i18n_subject(libelle_demarche: deleted_dossier.procedure.libelle)
|
I18n.with_locale(deleted_dossier.user_locale) do
|
||||||
@deleted_dossier = deleted_dossier
|
@subject = default_i18n_subject(libelle_demarche: deleted_dossier.procedure.libelle)
|
||||||
|
@deleted_dossier = deleted_dossier
|
||||||
|
|
||||||
mail(to: to_email, subject: @subject)
|
mail(to: to_email, subject: @subject)
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_instructeur(deleted_dossier, to_email)
|
|
||||||
@subject = default_i18n_subject(dossier_id: deleted_dossier.dossier_id)
|
|
||||||
@deleted_dossier = deleted_dossier
|
|
||||||
|
|
||||||
mail(to: to_email, subject: @subject)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_deletion_to_administration(deleted_dossier, to_email)
|
def notify_deletion_to_administration(deleted_dossier, to_email)
|
||||||
|
@ -98,11 +107,13 @@ class DossierMailer < ApplicationMailer
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_automatic_deletion_to_user(deleted_dossiers, to_email)
|
def notify_automatic_deletion_to_user(deleted_dossiers, to_email)
|
||||||
@state = deleted_dossiers.first.state
|
I18n.with_locale(deleted_dossiers.first.user_locale) do
|
||||||
@subject = default_i18n_subject(count: deleted_dossiers.count)
|
@state = deleted_dossiers.first.state
|
||||||
@deleted_dossiers = deleted_dossiers
|
@subject = default_i18n_subject(count: deleted_dossiers.count)
|
||||||
|
@deleted_dossiers = deleted_dossiers
|
||||||
|
|
||||||
mail(to: to_email, subject: @subject)
|
mail(to: to_email, subject: @subject)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_automatic_deletion_to_administration(deleted_dossiers, to_email)
|
def notify_automatic_deletion_to_administration(deleted_dossiers, to_email)
|
||||||
|
@ -113,11 +124,13 @@ class DossierMailer < ApplicationMailer
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_near_deletion_to_user(dossiers, to_email)
|
def notify_near_deletion_to_user(dossiers, to_email)
|
||||||
@state = dossiers.first.state
|
I18n.with_locale(dossiers.first.user_locale) do
|
||||||
@subject = default_i18n_subject(count: dossiers.count, state: @state)
|
@state = dossiers.first.state
|
||||||
@dossiers = dossiers
|
@subject = default_i18n_subject(count: dossiers.count, state: @state)
|
||||||
|
@dossiers = dossiers
|
||||||
|
|
||||||
mail(to: to_email, subject: @subject)
|
mail(to: to_email, subject: @subject)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_near_deletion_to_administration(dossiers, to_email)
|
def notify_near_deletion_to_administration(dossiers, to_email)
|
||||||
|
@ -129,18 +142,19 @@ class DossierMailer < ApplicationMailer
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_groupe_instructeur_changed(instructeur, dossier)
|
def notify_groupe_instructeur_changed(instructeur, dossier)
|
||||||
@subject = "Un dossier a changé de groupe instructeur"
|
@subject = default_i18n_subject(dossier_id: dossier.id)
|
||||||
@dossier_id = dossier.id
|
@dossier = dossier
|
||||||
@demarche = dossier.procedure.libelle
|
|
||||||
|
|
||||||
mail(from: NO_REPLY_EMAIL, to: instructeur.email, subject: @subject)
|
mail(to: instructeur.email, subject: @subject)
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_brouillon_not_submitted(dossier)
|
def notify_brouillon_not_submitted(dossier)
|
||||||
@subject = "Attention : votre dossier n’est pas déposé."
|
I18n.with_locale(dossier.user_locale) do
|
||||||
@dossier = dossier
|
@subject = default_i18n_subject(dossier_id: dossier.id)
|
||||||
|
@dossier = dossier
|
||||||
|
|
||||||
mail(to: dossier.user_email_for(:notification), subject: @subject)
|
mail(to: dossier.user_email_for(:notification), subject: @subject)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
%p= t(:hello, scope: [:views, :shared, :greetings])
|
%p= t(:hello, scope: [:views, :shared, :greetings])
|
||||||
|
|
||||||
%p
|
%p
|
||||||
= "Vous suiviez jusqu'à maintenant le dossier n°#{@dossier_id} de la démarche #{@demarche}."
|
= "Vous suiviez jusqu'à maintenant le dossier n° #{@dossier.id} de la démarche #{@dossier.procedure.libelle}."
|
||||||
L’usager a modifié le groupe de routage. Son dossier appartient maintenant à un groupe instructeur dont vous ne faites pas partie.
|
L’usager a modifié le groupe de routage. Son dossier appartient maintenant à un groupe instructeur dont vous ne faites pas partie.
|
||||||
%p
|
%p
|
||||||
Suite à cette modification, vous ne suivez plus ce dossier.
|
Suite à cette modification, vous ne suivez plus ce dossier.
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
- content_for :procedure_logo do
|
|
||||||
= render 'layouts/mailers/logo', url: @logo_url
|
|
||||||
|
|
||||||
%p= t(:hello, scope: [:views, :shared, :greetings])
|
|
||||||
|
|
||||||
- if !@dossier.brouillon?
|
|
||||||
%p
|
|
||||||
You received
|
|
||||||
%strong a new message
|
|
||||||
from the service in charge of examine your File.
|
|
||||||
%p
|
|
||||||
To read the message and answer it, select the following link:
|
|
||||||
|
|
||||||
= round_button('Read the message', messagerie_dossier_url(@dossier), :primary)
|
|
||||||
- else
|
|
||||||
%p
|
|
||||||
You received
|
|
||||||
%strong a new message
|
|
||||||
from the service in charge of examine the File you started a draft for on the procedure #{@dossier.procedure.libelle}.
|
|
||||||
%p{ style: "padding: 8px; color: #333333; background-color: #EEEEEE; font-size: 14px;" }
|
|
||||||
= @body
|
|
||||||
|
|
||||||
%p
|
|
||||||
If you chose to contact the service, please use the email available below in the page.
|
|
||||||
|
|
||||||
= round_button('Open the File', dossier_url(@dossier), :primary)
|
|
||||||
|
|
||||||
= render 'layouts/mailers/signature', service: @service
|
|
||||||
|
|
||||||
- content_for :footer do
|
|
||||||
= render 'layouts/mailers/service_footer', service: @service, dossier: @dossier
|
|
|
@ -4,25 +4,15 @@
|
||||||
%p= t(:hello, scope: [:views, :shared, :greetings])
|
%p= t(:hello, scope: [:views, :shared, :greetings])
|
||||||
|
|
||||||
- if !@dossier.brouillon?
|
- if !@dossier.brouillon?
|
||||||
%p
|
%p= t('.body', libelle_demarche: @dossier.procedure.libelle)
|
||||||
Vous avez reçu un
|
%p= t('.link')
|
||||||
%strong nouveau message
|
= round_button(t('.access_message'), messagerie_dossier_url(@dossier), :primary)
|
||||||
de la part du service en charge de votre dossier.
|
|
||||||
%p
|
|
||||||
Pour consulter le message et y répondre, cliquez sur le bouton ci-dessous :
|
|
||||||
|
|
||||||
= round_button('Lire le message', messagerie_dossier_url(@dossier), :primary)
|
|
||||||
- else
|
- else
|
||||||
%p
|
%p= t('.body_draft', libelle_demarche: @dossier.procedure.libelle)
|
||||||
Vous avez reçu un
|
|
||||||
%strong nouveau message
|
|
||||||
du service pour lequel votre dossier est en brouillon pour la démarche #{@dossier.procedure.libelle}.
|
|
||||||
%p{ style: "padding: 8px; color: #333333; background-color: #EEEEEE; font-size: 14px;" }
|
%p{ style: "padding: 8px; color: #333333; background-color: #EEEEEE; font-size: 14px;" }
|
||||||
= @body
|
= @body
|
||||||
|
%p= t('.contact')
|
||||||
%p Si vous souhaitez contacter le service, merci de le faire directement à l'aide de l'email en bas de page.
|
= round_button(t('.access_file'), dossier_url(@dossier), :primary)
|
||||||
|
|
||||||
= round_button('Voir le dossier', dossier_url(@dossier), :primary)
|
|
||||||
|
|
||||||
= render 'layouts/mailers/signature', service: @service
|
= render 'layouts/mailers/signature', service: @service
|
||||||
|
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
- content_for :procedure_logo do
|
|
||||||
= render 'layouts/mailers/logo', url: @logo_url
|
|
||||||
|
|
||||||
%p= t(:hello, scope: [:views, :shared, :greetings])
|
|
||||||
|
|
||||||
%p
|
|
||||||
You started filling a File on the procedure:
|
|
||||||
= succeed '.' do
|
|
||||||
%strong « #{@dossier.procedure.libelle} »
|
|
||||||
|
|
||||||
%p
|
|
||||||
You can access your File, to review or complete, by clicking on the following button:
|
|
||||||
|
|
||||||
= round_button('Access your File', dossier_url(@dossier), :primary)
|
|
||||||
|
|
||||||
- if @dossier.procedure.auto_archive_on
|
|
||||||
%p
|
|
||||||
Your File needs to be submitted before #{procedure_auto_archive_datetime(@dossier.procedure)}.
|
|
||||||
|
|
||||||
= render 'layouts/mailers/signature'
|
|
||||||
|
|
||||||
- content_for :footer do
|
|
||||||
= render 'layouts/mailers/service_footer', service: @service, dossier: @dossier
|
|
|
@ -3,21 +3,12 @@
|
||||||
|
|
||||||
%p= t(:hello, scope: [:views, :shared, :greetings])
|
%p= t(:hello, scope: [:views, :shared, :greetings])
|
||||||
|
|
||||||
%p
|
%p= t('.body', libelle_demarche: @dossier.procedure.libelle)
|
||||||
Vous avez commencé à remplir un dossier pour la démarche
|
%p= t('.link')
|
||||||
= succeed '.' do
|
= round_button(t('.access_file'), dossier_url(@dossier), :primary)
|
||||||
%strong « #{@dossier.procedure.libelle} »
|
|
||||||
|
|
||||||
%p
|
|
||||||
Vous pouvez
|
|
||||||
%strong retrouver et compléter votre dossier
|
|
||||||
en cliquant sur le bouton ci-dessous:
|
|
||||||
|
|
||||||
= round_button('Afficher votre dossier', dossier_url(@dossier), :primary)
|
|
||||||
|
|
||||||
- if @dossier.procedure.auto_archive_on
|
- if @dossier.procedure.auto_archive_on
|
||||||
%p
|
%p= t('.submit_before', before: procedure_auto_archive_datetime(@dossier.procedure))
|
||||||
Vous pouvez déposer votre dossier jusqu’au #{procedure_auto_archive_datetime(@dossier.procedure)}.
|
|
||||||
|
|
||||||
= render 'layouts/mailers/signature'
|
= render 'layouts/mailers/signature'
|
||||||
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
- content_for :procedure_logo do
|
|
||||||
= render 'layouts/mailers/logo', url: @logo_url
|
|
||||||
|
|
||||||
%p= t(:hello, scope: [:views, :shared, :greetings])
|
|
||||||
|
|
||||||
%p
|
|
||||||
Your File will be reexamined. All previous decisions are void.
|
|
||||||
To see the File created on procedure
|
|
||||||
%strong= @dossier.procedure.libelle
|
|
||||||
, select the following link:
|
|
||||||
= link_to dossier_url(@dossier), dossier_url(@dossier), target: '_blank', rel: 'noopener'
|
|
||||||
|
|
||||||
- if @dossier.procedure.service.present?
|
|
||||||
%p
|
|
||||||
In order to get more details about the decision to reexamin, please contact the following service:
|
|
||||||
= mail_to @dossier.procedure.service.email, @dossier.procedure.service.email
|
|
||||||
|
|
||||||
= render 'layouts/mailers/signature'
|
|
||||||
|
|
||||||
- content_for :footer do
|
|
||||||
= render 'layouts/mailers/service_footer', service: @service, dossier: @dossier
|
|
|
@ -4,15 +4,11 @@
|
||||||
%p= t(:hello, scope: [:views, :shared, :greetings])
|
%p= t(:hello, scope: [:views, :shared, :greetings])
|
||||||
|
|
||||||
%p
|
%p
|
||||||
Votre dossier va être réexaminé, la précédente décision sur ce dossier est caduque.
|
= t('.body', dossier_id: @dossier.id, libelle_demarche: @dossier.procedure.libelle)
|
||||||
Vous pouvez retrouver le dossier que vous avez créé pour la démarche
|
|
||||||
%strong= @dossier.procedure.libelle
|
|
||||||
à l'adresse suivante :
|
|
||||||
= link_to dossier_url(@dossier), dossier_url(@dossier), target: '_blank', rel: 'noopener'
|
= link_to dossier_url(@dossier), dossier_url(@dossier), target: '_blank', rel: 'noopener'
|
||||||
- if @dossier.procedure.service.present?
|
- if @dossier.procedure.service.present?
|
||||||
%p
|
%p
|
||||||
Pour obtenir le détail de cette modification de la décision, vous pouvez contacter par
|
= t('.contact')
|
||||||
email:
|
|
||||||
= mail_to @dossier.procedure.service.email, @dossier.procedure.service.email
|
= mail_to @dossier.procedure.service.email, @dossier.procedure.service.email
|
||||||
|
|
||||||
= render 'layouts/mailers/signature'
|
= render 'layouts/mailers/signature'
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
fr:
|
||||||
|
dossier_mailer:
|
||||||
|
notify_brouillon_not_submitted:
|
||||||
|
subject: "Attention : votre dossier nº %{dossier_id} n’est pas déposé"
|
|
@ -0,0 +1,4 @@
|
||||||
|
fr:
|
||||||
|
dossier_mailer:
|
||||||
|
notify_groupe_instructeur_changed:
|
||||||
|
subject: Le dossier nº %{dossier_id} a changé de groupe instructeur
|
13
config/locales/views/dossier_mailer/notify_new_answer/en.yml
Normal file
13
config/locales/views/dossier_mailer/notify_new_answer/en.yml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
fr:
|
||||||
|
dossier_mailer:
|
||||||
|
notify_new_answer:
|
||||||
|
subject: New message on your file nº %{dossier_id} « %{libelle_demarche} »
|
||||||
|
body_html: |
|
||||||
|
You received <b>a new message</b> from the service in charge of reviewing your file on « %{libelle_demarche} ».
|
||||||
|
link: |
|
||||||
|
To read the message and answer it, select the following link:
|
||||||
|
body_draft_html: |
|
||||||
|
You received <b>a new message</b> from the service in charge of reviewing the file you started a draft for on the procedure « %{libelle_demarche} ».
|
||||||
|
contact: If you chose to contact the service, please use the email available below in the page.
|
||||||
|
access_message: Read the message
|
||||||
|
access_file: Open file
|
13
config/locales/views/dossier_mailer/notify_new_answer/fr.yml
Normal file
13
config/locales/views/dossier_mailer/notify_new_answer/fr.yml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
fr:
|
||||||
|
dossier_mailer:
|
||||||
|
notify_new_answer:
|
||||||
|
subject: Nouveau message pour votre dossier nº %{dossier_id} « %{libelle_demarche} »
|
||||||
|
body_html: |
|
||||||
|
Vous avez reçu un <b>nouveau message</b> de la part du service en charge de votre dossier.
|
||||||
|
link: |
|
||||||
|
Pour consulter le message et y répondre, cliquez sur le bouton ci-dessous :
|
||||||
|
body_draft_html: |
|
||||||
|
Vous avez reçu un <b>nouveau message</b>du service pour lequel votre dossier est en brouillon pour la démarche « %{libelle_demarche} ».
|
||||||
|
contact: Si vous souhaitez contacter le service, merci de le faire directement à l'aide de l'email en bas de page.
|
||||||
|
access_message: Lire le message
|
||||||
|
access_file: Voir le dossier
|
|
@ -1,5 +1,5 @@
|
||||||
fr:
|
fr:
|
||||||
dossier_mailer:
|
dossier_mailer:
|
||||||
notify_new_dossier_depose_to_instructeur:
|
notify_new_dossier_depose_to_instructeur:
|
||||||
subject: Nouveau dossier déposé pour la démarche %{libelle_demarche}
|
subject: Nouveau dossier déposé pour la démarche « %{libelle_demarche} »
|
||||||
body: Un nouveau dossier a été déposé (n° %{dossier_id}) pour la démarche %{libelle_demarche}
|
body: Un nouveau dossier a été déposé (n° %{dossier_id}) pour la démarche « %{libelle_demarche} »
|
||||||
|
|
10
config/locales/views/dossier_mailer/notify_new_draft/en.yml
Normal file
10
config/locales/views/dossier_mailer/notify_new_draft/en.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
en:
|
||||||
|
dossier_mailer:
|
||||||
|
notify_new_draft:
|
||||||
|
subject: Draft file created on procedure « %{libelle_demarche} »
|
||||||
|
body_html: |
|
||||||
|
You created a draft file on procedure <b>« %{libelle_demarche} »</b>.
|
||||||
|
link_html: |
|
||||||
|
You can access your file, to <b>review or complete</b>, by clicking on the following button:
|
||||||
|
submit_before: Your file needs to be submitted before %{before}
|
||||||
|
access_file: Open file
|
10
config/locales/views/dossier_mailer/notify_new_draft/fr.yml
Normal file
10
config/locales/views/dossier_mailer/notify_new_draft/fr.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
fr:
|
||||||
|
dossier_mailer:
|
||||||
|
notify_new_draft:
|
||||||
|
subject: Retrouvez votre brouillon pour la démarche « %{libelle_demarche} »
|
||||||
|
body_html: |
|
||||||
|
Vous avez commencé à remplir un dossier pour la démarche <b>« %{libelle_demarche} »</b>.
|
||||||
|
link_html: |
|
||||||
|
Vous pouvez <b>retrouver et compléter votre dossier</b> en cliquant sur le bouton ci-dessous :
|
||||||
|
submit_before: Vous pouvez déposer votre dossier jusqu’au %{before}.
|
||||||
|
access_file: Afficher votre dossier
|
|
@ -0,0 +1,9 @@
|
||||||
|
en:
|
||||||
|
dossier_mailer:
|
||||||
|
notify_revert_to_instruction:
|
||||||
|
subject: Your file nº %{dossier_id} « %{libelle_demarche} » will be reexamined
|
||||||
|
body_html: |
|
||||||
|
Your file nº %{dossier_id} will be reexamined. All previous decisions are void.
|
||||||
|
To see the file created on procedure <b>« %{libelle_demarche} »</b>, select the following link:
|
||||||
|
contact: |
|
||||||
|
In order to get more details about the decision to reexamin, please contact the following service:
|
|
@ -0,0 +1,9 @@
|
||||||
|
fr:
|
||||||
|
dossier_mailer:
|
||||||
|
notify_revert_to_instruction:
|
||||||
|
subject: Votre dossier nº %{dossier_id} sur la démarche « %{libelle_demarche} » est en train d’être réexaminé
|
||||||
|
body_html: |
|
||||||
|
Votre dossier va être réexaminé, la précédente décision sur ce dossier est caduque.
|
||||||
|
Vous pouvez retrouver le dossier que vous avez créé pour la démarche <b>« %{libelle_demarche} »</b> à l'adresse suivante :
|
||||||
|
contact: |
|
||||||
|
Pour obtenir le détail de cette modification de la décision, vous pouvez contacter par email :
|
|
@ -202,8 +202,8 @@ RSpec.describe DossierMailer, type: :mailer do
|
||||||
|
|
||||||
subject { described_class.notify_groupe_instructeur_changed(instructeur, dossier) }
|
subject { described_class.notify_groupe_instructeur_changed(instructeur, dossier) }
|
||||||
|
|
||||||
it { expect(subject.subject).to eq("Un dossier a changé de groupe instructeur") }
|
it { expect(subject.subject).to eq("Le dossier nº #{dossier.id} a changé de groupe instructeur") }
|
||||||
it { expect(subject.body).to include("n°#{dossier.id}") }
|
it { expect(subject.body).to include("n° #{dossier.id}") }
|
||||||
it { expect(subject.body).to include(dossier.procedure.libelle) }
|
it { expect(subject.body).to include(dossier.procedure.libelle) }
|
||||||
it { expect(subject.body).to include("Suite à cette modification, vous ne suivez plus ce dossier.") }
|
it { expect(subject.body).to include("Suite à cette modification, vous ne suivez plus ce dossier.") }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue