Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-mlc
kohinos
Commits
12f13f77
Commit
12f13f77
authored
Mar 05, 2021
by
Mathieu Poisbeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#478: improve mail of flux notification
parent
796a21cc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
11 deletions
+26
-11
MLCEventListener.php
src/EventListener/MLCEventListener.php
+6
-1
email_layout.html.twig
templates/email/email_layout.html.twig
+12
-6
notification_flux.html.twig
templates/email/notification_flux.html.twig
+5
-4
mails.fr.yaml
translations/mails.fr.yaml
+3
-0
No files found.
src/EventListener/MLCEventListener.php
View file @
12f13f77
...
@@ -143,7 +143,12 @@ class MLCEventListener implements EventSubscriberInterface
...
@@ -143,7 +143,12 @@ class MLCEventListener implements EventSubscriberInterface
private
function
sendMail
(
User
$user
,
Flux
$flux
)
private
function
sendMail
(
User
$user
,
Flux
$flux
)
{
{
// @TODO => un mail différent en fonction du type de flux (et de l'utilisateur ?)
// @TODO => un mail différent en fonction du type de flux (et de l'utilisateur ?)
$subject
=
$this
->
em
->
getRepository
(
GlobalParameter
::
class
)
->
val
(
GlobalParameter
::
MLC_NAME_SMALL
)
.
' : '
;
$subject
=
sprintf
(
'%s : %s'
,
$this
->
em
->
getRepository
(
GlobalParameter
::
class
)
->
val
(
GlobalParameter
::
MLC_NAME_SMALL
),
$this
->
translator
->
trans
(
'Confirmation d\'opération'
)
);
$mail
=
(
new
\Swift_Message
(
$subject
))
$mail
=
(
new
\Swift_Message
(
$subject
))
->
setFrom
(
$this
->
em
->
getRepository
(
GlobalParameter
::
class
)
->
val
(
GlobalParameter
::
MLC_NOTIF_EMAIL
))
->
setFrom
(
$this
->
em
->
getRepository
(
GlobalParameter
::
class
)
->
val
(
GlobalParameter
::
MLC_NOTIF_EMAIL
))
->
setTo
(
$user
->
getEmail
())
->
setTo
(
$user
->
getEmail
())
...
...
templates/email/email_layout.html.twig
View file @
12f13f77
...
@@ -24,17 +24,23 @@
...
@@ -24,17 +24,23 @@
<tr>
<tr>
<td>
<td>
{%
block
main
%}
{%
block
main
%}
{%
block
title
%}
{%
block
header
%}
<h2
style=
"font-size: 18px; color: #3c8dbc; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: bold; line-height: 1.2em; margin: 40px 0 10px;"
>
{{
'header'
|
trans
(
{}
,
'mails'
)
|
raw
}}
{{
title
}}
{%
endblock
header
%}
{%
block
title
%}
<h2
style=
"
{{
'title-css-styles'
|
trans
(
{}
,
'mails'
)
|
raw
}}
"
>
{{
title
}}
</h2>
</h2>
{%
endblock
title
%}
{%
endblock
title
%}
<br/>
<br/>
{%
block
content
%}{%
endblock
content
%}
{%
block
content
%}{%
endblock
content
%}
{%
block
footer
%}
{%
block
footer
%}
{{
'footer'
|
trans
(
{}
,
'mails'
)
|
raw
}}
{{
'footer'
|
trans
(
{}
,
'mails'
)
|
raw
}}
{%
endblock
footer
%}
{%
endblock
footer
%}
{%
endblock
main
%}
{%
endblock
main
%}
</td>
</td>
</tr>
</tr>
...
...
templates/email/notification_flux.html.twig
View file @
12f13f77
...
@@ -6,17 +6,17 @@
...
@@ -6,17 +6,17 @@
{%
endset
%}
{%
endset
%}
{%
block
content
%}
{%
block
content
%}
<h2
style=
"font-size: 18px; color: #111111; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: bold; line-height: 1.2em; margin: 40px 0 10px;"
>
{{
user.commonname
|
title
}}
</h2><br/>
{# @TODO : peaufiner le mail des flux + revoir la liste des utilisateurs à notifier dans les entités getUsersToNotify() ! #}
{# @TODO : peaufiner le mail des flux + revoir la liste des utilisateurs à notifier dans les entités getUsersToNotify() ! #}
<h3>
<h3>
{%
if
flux.type
==
'reconversion'
%}
{%
if
flux.type
==
'reconversion'
%}
{{
'Demande de reconversion'
}}
{{
'Demande de reconversion'
}}
{%
else
%}
{%
else
%}
{{
flux.parenttype
|
capitalize
}}
:
{{
flux.type
|
replace
(
{
'_'
:
'
=>
'
}
)
}}
{{
flux.parenttype
|
capitalize
}}
:
{{
flux.type
|
replace
(
{
'_'
:
'
→
'
}
)
}}
{%
endif
%}
{%
endif
%}
</h3>
</h3>
<p>
De
{{
flux.expediteur
}}
à
{{
flux.destinataire
}}
</p>
<p>
Montant de
{{
flux.montant
}}
(Moyen :
{{
flux.moyen
}}
)
</p>
<p>
De
<strong>
{{
flux.expediteur
}}
</strong>
à
<strong>
{{
flux.destinataire
}}
</strong></p>
<p>
Montant :
<strong>
{{
flux.montant
}}
{{
'eMLC'
|
trans
}}
</strong>
(Moyen :
{{
flux.moyen
}}
)
</p>
<p>
Référence :
{{
flux.reference
}}
</p>
<p>
Référence :
{{
flux.reference
}}
</p>
<p>
Opérateur :
{{
flux.operateur.name
}}
</p>
<p>
Opérateur :
{{
flux.operateur.name
}}
</p>
{%
endblock
%}
{%
endblock
%}
\ No newline at end of file
translations/mails.fr.yaml
View file @
12f13f77
header
:
'
'
footer
:
'
'
footer
:
'
'
title-css-styles
:
"
font-size:
18px;
color:
#3c8dbc;
font-family:
'Helvetica
Neue',
Helvetica,
Arial,
'Lucida
Grande',
sans-serif;
font-weight:
bold;
line-height:
1.2em;
margin:
40px
0
10px;"
add_adherent
:
add_adherent
:
title
:
Valider la création de votre compte
title
:
Valider la création de votre compte
welcome
:
Un administreur a créé votre nouveau compte MLC
welcome
:
Un administreur a créé votre nouveau compte MLC
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment