mirror of
https://framagit.org/tykayn/date-poll-api
synced 2023-08-25 08:23:11 +02:00
⚡ test templates
This commit is contained in:
parent
1e9c5074b2
commit
ca7dcceda7
@ -265,6 +265,12 @@ class PollController extends AbstractController {
|
||||
$emailChoicesTemplates = [
|
||||
'creation_poll' => 'creation-mail.html.twig',
|
||||
'creation_comment' => 'comment-notification.html.twig',
|
||||
'creation_vote' => 'vote-notification.html.twig',
|
||||
];
|
||||
$emailChoicesTitles = [
|
||||
'creation_poll' => 'Framadate | Création de sondage - ' . $poll->getTitle(),
|
||||
'creation_comment' => 'Framadate | Commentaire de ' . $foundOwner->getPseudo() . ' - sondage ' . $poll->getTitle(),
|
||||
'creation_vote' => 'Framadate | Commentaire de ' . $foundOwner->getPseudo() . ' - sondage ' . $poll->getTitle(),
|
||||
];
|
||||
|
||||
// $mail_service->sendCreationMailAction( $foundOwner, $poll );
|
||||
@ -272,9 +278,8 @@ class PollController extends AbstractController {
|
||||
'owner' => $foundOwner,
|
||||
'comment' => $comment,
|
||||
'poll' => $poll,
|
||||
'url' => $poll->getCustomUrl(),
|
||||
'title' => 'Création de sondage - ' . $poll->getTitle(),
|
||||
'email_template' => 'emails/' . $emailChoicesTemplates[ $emailChoice ],
|
||||
'title' => $emailChoicesTitles[ $emailChoice ],
|
||||
];
|
||||
|
||||
return $this->render( $templateVars[ 'email_template' ], $templateVars );
|
||||
|
15
templates/emails/vote-notification.html.twig
Normal file
15
templates/emails/vote-notification.html.twig
Normal file
@ -0,0 +1,15 @@
|
||||
{#[Framadate] Notification d'un sondage : TESSSSSSSSSST#}
|
||||
{% extends 'email-base.html.twig' %}
|
||||
{% block content %}
|
||||
<strong>
|
||||
{{ owner.pseudo }}
|
||||
</strong>
|
||||
vient de voter au sondage.
|
||||
|
||||
{{ owner.votes |length }}
|
||||
<br>
|
||||
Vous pouvez retrouver votre sondage avec le lien suivant :
|
||||
{% include 'emails/partial/admin_link.html.twig' %}
|
||||
{% include 'emails/partial/public_link.html.twig' %}
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user