diff --git a/src/Controller/PollController.php b/src/Controller/PollController.php index 7237064..a177ad0 100644 --- a/src/Controller/PollController.php +++ b/src/Controller/PollController.php @@ -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 ); diff --git a/templates/emails/vote-notification.html.twig b/templates/emails/vote-notification.html.twig new file mode 100644 index 0000000..afaf090 --- /dev/null +++ b/templates/emails/vote-notification.html.twig @@ -0,0 +1,15 @@ +{#[Framadate] Notification d'un sondage : TESSSSSSSSSST#} +{% extends 'email-base.html.twig' %} +{% block content %} + + {{ owner.pseudo }} + + vient de voter au sondage. + + {{ owner.votes |length }} +
+ Vous pouvez retrouver votre sondage avec le lien suivant : + {% include 'emails/partial/admin_link.html.twig' %} + {% include 'emails/partial/public_link.html.twig' %} + +{% endblock %}