Commit d6ea554b authored by Mat's avatar Mat

newsletter: template mail, affiche les items triés

parent 27e2b4c6
......@@ -27,6 +27,7 @@
Infolettre {{ body.lettre.reference }} (#{{ body.lettre.id }})<br>
Statut: {{ body.lettre.status }}<br>
</p>
<hr>
<div>
<h3>
......@@ -40,44 +41,47 @@
Responsable du dépôt: {{ body.lettre.groupe.depot.responsable }}<br>
Dépôt des paniers: {{ body.lettre.groupe.depot.jourPanier }}, {{ body.lettre.groupe.depot.heurePanier|date('H:i') }}
</p>
<hr>
<div>
<p>
Offre {{ body.lettre.offre.reference }} (#{{ body.lettre.offre.id }})<br>
Expire le {{ body.lettre.offre.endedAt|date('d-m-Y, à H:i') }}<br>
Statut: {{ body.lettre.offre.status }}<br>
{{ body.lettre.offre.sorted }}
</p>
<ul>
{% for legume in body.lettre.offre.offreLegumes %}
<li>
#{{ legume.id }}<br>
{{ legume.nom }}: {{ legume.description }}<br>
{{ legume.prixUnitaire }} €/{{ legume.unite }}
</li>
{% endfor %}
</ul>
<a href="{{ absolute_url(path('potage_today', {token: to.token })) }}" target="_blank" rel="noreferrer">
<button>Commander des légumes</button>
</a>
</div>
{% for info in body.itemsSorted %}
{% if info.id is defined %}
<div class="info"
style="color: {{ info.color }}">
{{ body.lettre.sorted }}
{% for info in body.lettre.infos %}
<div style="color: {{ info.color }}">
{% if info.isPost == true %}
<span>{{ info.postedAt|date('d-m-Y, à H:i') }}</span>
{% endif %}
<h2>{{ info.title }}</h2>
<h3>{{ info.subtitle }}</h3>
<p>{{ info.text }}</p>
</div>
{% if info.isPost == true %}
<span>{{ info.postedAt|date('d-m-Y, à H:i') }}</span>
{% endif %}
<h2>{{ info.title }} (#{{ info.id }})</h2>
<h3>{{ info.subtitle }}</h3>
<p>{{ info.text }}</p>
</div>
{% else %}
{% set offre = info %}
<div class="offre">
<p>
Offre {{ body.lettre.offre.reference }} (#{{ body.lettre.offre.id }})<br>
Expire le {{ body.lettre.offre.endedAt|date('d-m-Y, à H:i') }}<br>
Statut: {{ body.lettre.offre.status }}
</p>
<ul>
{% for legume in offre %}
<li>
#{{ legume.id }}<br>
{{ legume.nom }}: {{ legume.description }}<br>
{{ legume.prixUnitaire }} €/{{ legume.unite }}
</li>
{% endfor %}
</ul>
<a href="{{ absolute_url(path('potage_today', {token: to.token })) }}" target="_blank" rel="noreferrer">
<button>Commander des légumes</button>
</a>
</div>
{% endif %}
{% endfor %}
</div>
{{ dump() }}
{#
#}
{{ dump() }}
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment