1
0
mirror of https://framagit.org/tykayn/date-poll-api synced 2023-08-25 08:23:11 +02:00

more emails

This commit is contained in:
Baptiste Lemoine 2020-04-12 17:50:25 +02:00
parent ca7dcceda7
commit 7c9b97ac58
3 changed files with 22 additions and 6 deletions

View File

@ -255,7 +255,7 @@ class PollController extends AbstractController {
* @return int
*/
// public function sendCreationMailAction( Owner $admin_user, Poll $poll, \Swift_Mailer $mailer) {
public function testSendCreationMailAction( MailService $mail_service, $emailChoice = 'creation_comment' ) {
public function testSendCreationMailAction( MailService $mail_service, $emailChoice = 'creation_poll_admin' ) {
$em = $this->getDoctrine()->getRepository( Owner::class );
$foundOwner = $em->find( 1 );
$poll = $foundOwner->getPolls()[ 0 ];
@ -264,13 +264,19 @@ class PollController extends AbstractController {
$emailChoicesTemplates = [
'creation_poll' => 'creation-mail.html.twig',
'creation_poll_admin' => 'author-mail.html.twig',
'owner_list' => 'owner-list.html.twig',
'expiration' => 'expiration-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(),
'creation_poll' => 'Framadate | Création de sondage - lien public - ' . $poll->getTitle(),
'creation_poll_admin' => 'Framadate | Création de sondage - lien admin - ',
'owner_list' => 'Framadate | Vos sondages créés',
'expiration' => 'Framadate | Notice d\'expiration du sondage '. $poll->getTitle(),
'creation_comment' => 'Framadate | Commentaire de "' . $foundOwner->getPseudo() . '" - sondage ' . $poll->getTitle(),
'creation_vote' => 'Framadate | Vote de "' . $foundOwner->getPseudo() . '" - sondage ' . $poll->getTitle(),
];
// $mail_service->sendCreationMailAction( $foundOwner, $poll );

View File

@ -8,11 +8,22 @@
padding: 1em;
}
.footer-content{
margin-top: 1em;
background: #ccc;
}
ul {
border-left: 3px solid #ddd;
}
a {
padding: 1em; border-radius: 3px;
background: #7d6c99;
color: #201b27;
margin: 0.5rem 0;
display: inline-block;
}
h1,h2,h3{
color: #3c334a;
}
</style>
<header>
{% block title %}
@ -23,6 +34,7 @@
{% endif %}
<hr>
{% endblock %}
{% block stylesheets %}{% endblock %}
</header>
<main>

View File

@ -5,8 +5,6 @@
{{ 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' %}