copanier/copanier/templates/includes/order_button.html
Daniel Atwood 02699d55aa Reorganize the files,
I've split everything in different concepts (groups, login, products and delivery) so that it's easier to find what we're looking for (the __init__.py file was really too big).
2020-03-13 18:58:54 +01:00

12 lines
635 B
HTML

{% if (delivery.status == delivery.OPEN or delivery.status == delivery.ADJUSTMENT) and delivery.has_products %}
<a class="button" href="/distribution/{{ delivery.id }}/commander">
{% if delivery.status == delivery.ADJUSTMENT %}
Ajuster ma commande
{% elif delivery.status == delivery.OPEN %}
{% if request.user.email in delivery.orders %}Gérer ma commande{% else %}Commander{% endif %}
{% endif %}
</a>
{% endif %}
{% if request.user.email in delivery.orders %}
<span class="flag" title="Mon solde"><i class="icon-wallet"></i>&nbsp;{{ delivery.total_for(request.user) }} €</span>
{% endif %}