mirror of
https://framagit.org/tykayn/date-poll-api
synced 2023-08-25 08:23:11 +02:00
⚡ send email infos to a poll creator
This commit is contained in:
parent
2c919610f7
commit
06f2a40e04
1
.env
1
.env
@ -16,6 +16,7 @@
|
|||||||
###> symfony/framework-bundle ###
|
###> symfony/framework-bundle ###
|
||||||
APP_ENV=dev
|
APP_ENV=dev
|
||||||
APP_SECRET=597b0529ac702d27dcb9089f7e69c362
|
APP_SECRET=597b0529ac702d27dcb9089f7e69c362
|
||||||
|
# Base website url, should contain https:// and having no trailing slash. example: BASE_URL=https://framadate.org
|
||||||
BASE_URL=http://localhost/
|
BASE_URL=http://localhost/
|
||||||
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
|
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
|
||||||
#TRUSTED_HOSTS='^localhost|example\.com$'
|
#TRUSTED_HOSTS='^localhost|example\.com$'
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
###> symfony/framework-bundle ###
|
###> symfony/framework-bundle ###
|
||||||
APP_ENV=prod
|
APP_ENV=prod
|
||||||
APP_SECRET=597b0529ac702d27dcb9089f7e69c362
|
APP_SECRET=597b0529ac702d27dcb9089f7e69c362
|
||||||
BASE_URL=http://framadate.org
|
# Base website url, should contain https:// and having no trailing slash. example: BASE_URL=https://framadate.org
|
||||||
|
BASE_URL=https://framadate.org
|
||||||
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
|
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
|
||||||
#TRUSTED_HOSTS='^localhost|example\.com$'
|
#TRUSTED_HOSTS='^localhost|example\.com$'
|
||||||
###< symfony/framework-bundle ###
|
###< symfony/framework-bundle ###
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
Experimental REST backend in symfony 4 for Funky framadate frontend.
|
Experimental REST backend in symfony 4 for Funky framadate frontend.
|
||||||
https://framagit.org/framasoft/framadate/funky-framadate-front
|
https://framagit.org/framasoft/framadate/funky-framadate-front
|
||||||
|
|
||||||
|
Follow this guide to setup.
|
||||||
|
|
||||||
|
|
||||||
## TODO:
|
## TODO:
|
||||||
|
|
||||||
return stack of votes when we want to get the configuration of one poll (see [doc/examples.md](doc/examples.md))
|
return stack of votes when we want to get the configuration of one poll (see [doc/examples.md](doc/examples.md))
|
||||||
|
@ -83,7 +83,7 @@ class DefaultController extends AbstractController {
|
|||||||
];
|
];
|
||||||
|
|
||||||
$message = ( new Swift_Message( 'Framadate - mes sondages' ) )
|
$message = ( new Swift_Message( 'Framadate - mes sondages' ) )
|
||||||
->setFrom( 'ne-pas-repondre@framdate-api.cipherbliss.com' )
|
->setFrom( 'ne-pas-repondre@framadate-api.cipherbliss.com' )
|
||||||
->setTo( $founduser->getEmail() )
|
->setTo( $founduser->getEmail() )
|
||||||
->setBody(
|
->setBody(
|
||||||
$this->renderView(
|
$this->renderView(
|
||||||
|
4
templates/emails/footer.html.twig
Normal file
4
templates/emails/footer.html.twig
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Merci de votre confiance.
|
||||||
|
<a href="{{ BASE_URL }}">
|
||||||
|
Framadate
|
||||||
|
</a>
|
@ -1,17 +1,65 @@
|
|||||||
{#[Framadate][Réservé à l'auteur] Sondage: TESSSSSSSSSST#}
|
{#[Framadate][Réservé à l'auteur] Sondage: TESSSSSSSSSST#}
|
||||||
Voici la liste des {{ polls|length }} sondages Framadate que vous avez créé.
|
<h2>
|
||||||
|
|
||||||
|
Voici la liste des {{ polls|length }} sondages
|
||||||
|
<a href="{{ BASE_URL }}">
|
||||||
|
Framadate
|
||||||
|
</a>
|
||||||
|
que vous avez créé.
|
||||||
|
</h2>
|
||||||
|
<div>
|
||||||
|
Si vous n'avez pas demandé à recevoir cet email, veuillez en informer les administrateurs du site Framadate.
|
||||||
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
{% for p in polls %}
|
{% for p in polls %}
|
||||||
<li>
|
<li>
|
||||||
<div class="public">
|
|
||||||
|
<strong>
|
||||||
{{ p.title }}
|
{{ p.title }}
|
||||||
<a href="">
|
</strong>
|
||||||
{{ BASE_URL }}/admin/{{ p.adminKey }}
|
|
||||||
</a>
|
|
||||||
|
<br>
|
||||||
|
<div class="creation">
|
||||||
|
créé le {{ p.creationDate| date('Y m d ') }}
|
||||||
|
</div>
|
||||||
|
<div class="creation">
|
||||||
|
expirera le {{ p.expiracyDate| date('Y m d ') }}
|
||||||
|
</div>
|
||||||
|
<span class="votes-count">
|
||||||
|
{{ p.stacksOfVotes |length }} votes
|
||||||
|
</span>
|
||||||
|
<span class="votes-count">
|
||||||
|
{{ p.comments |length }} commentaires
|
||||||
|
</span>
|
||||||
|
{% if p.password |length %}
|
||||||
|
(accès avec mot de passe)
|
||||||
|
{% else %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="public">
|
||||||
|
<span>
|
||||||
|
lien à donner aux votants:
|
||||||
|
</span>
|
||||||
|
{% if p.customUrl |length %}
|
||||||
|
<a href="{{ BASE_URL }}/poll/{{ p.customUrl }}">
|
||||||
|
{{ BASE_URL }}/poll/{{ p.customUrl }}
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ BASE_URL }}/poll/{{ p.customUrl }}">
|
||||||
|
{{ BASE_URL }}/poll/{{ p.id }}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="admin">
|
<div class="admin">
|
||||||
<a href="{{ BASE_URL }}/admin/{{ p.adminKey }}">{{ BASE_URL }}/admin/{{ p.adminKey }}</a>
|
<span>
|
||||||
|
administration:
|
||||||
|
</span>
|
||||||
|
<a href="{{ BASE_URL }}/poll/{{ p.id }}/admin/{{ p.adminKey }}">{{ BASE_URL }}
|
||||||
|
/admin/{{ p.adminKey }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -19,5 +67,4 @@ Voici la liste des {{ polls|length }} sondages Framadate que vous avez créé.
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
Merci de votre confiance.
|
{% include 'footer.html.twig' %}
|
||||||
Framadate
|
|
||||||
|
@ -22,6 +22,16 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<app-root></app-root>
|
<app-root></app-root>
|
||||||
|
<footer id="main-footer" class="text-center">
|
||||||
|
<a href="https://framagit.org/framasoft/framadate">
|
||||||
|
Sources
|
||||||
|
<i class="fa fa-gitlab"></i>
|
||||||
|
</a>
|
||||||
|
<a href="">
|
||||||
|
Contact
|
||||||
|
<i class="fa fa-envelope"></i>
|
||||||
|
</a>
|
||||||
|
</footer>
|
||||||
<script
|
<script
|
||||||
src="runtime-es2018.js"
|
src="runtime-es2018.js"
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
|
Loading…
Reference in New Issue
Block a user