1
0
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:
Baptiste Lemoine 2020-04-12 17:41:06 +02:00
parent 1e9c5074b2
commit ca7dcceda7
2 changed files with 22 additions and 2 deletions

View File

@ -265,6 +265,12 @@ class PollController extends AbstractController {
$emailChoicesTemplates = [ $emailChoicesTemplates = [
'creation_poll' => 'creation-mail.html.twig', 'creation_poll' => 'creation-mail.html.twig',
'creation_comment' => 'comment-notification.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 ); // $mail_service->sendCreationMailAction( $foundOwner, $poll );
@ -272,9 +278,8 @@ class PollController extends AbstractController {
'owner' => $foundOwner, 'owner' => $foundOwner,
'comment' => $comment, 'comment' => $comment,
'poll' => $poll, 'poll' => $poll,
'url' => $poll->getCustomUrl(),
'title' => 'Création de sondage - ' . $poll->getTitle(),
'email_template' => 'emails/' . $emailChoicesTemplates[ $emailChoice ], 'email_template' => 'emails/' . $emailChoicesTemplates[ $emailChoice ],
'title' => $emailChoicesTitles[ $emailChoice ],
]; ];
return $this->render( $templateVars[ 'email_template' ], $templateVars ); return $this->render( $templateVars[ 'email_template' ], $templateVars );

View 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 %}