la-chariotte/la_chariotte/order/templates/order/index.html
2023-05-24 13:52:36 +02:00

89 lines
No EOL
3.2 KiB
HTML

{% extends 'base.html' %}
{% block title %}Mes commandes groupées{% endblock %}
{% block content_title %}Commandes groupées que vous organisez{% endblock %}
{% block content %}
<div class="buttons is-pulled-right">
<a class="button is-primary" href="{% url 'order:create_grouped_order' %}">Créer une nouvelle commande groupée</a>
</div>
{% if grouped_order_list.incoming_grouped_orders or grouped_order_list.crossed_deadline_grouped_orders or grouped_order_list.old_grouped_orders %}
{% if grouped_order_list.incoming_grouped_orders %}
<p class="is-size-4">Commandes groupées à venir</p>
<table class="table">
<thead>
<tr>
<th>Nom</th>
<th>Livraison</th>
<th>Fin des commandes</th>
<th>Nombre de commandes</th>
<th>Voir</th>
</tr>
</thead>
<tbody>
{% for gr_order in grouped_order_list.incoming_grouped_orders %}
<tr>
<td><a href="{% url 'order:grouped_order_detail' gr_order.id %}">{{ gr_order }}</a></td>
<td>{{ gr_order.delivery_date }}</td>
<td>{{ gr_order.deadline }}</td>
<td>Nb de commandes</td>
<td><a href="{% url 'order:grouped_order_detail' gr_order.id %}">Détail </a>|<a href="{% url 'order:grouped_order_overview' gr_order.id %}"> Organisation</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if grouped_order_list.crossed_deadline_grouped_orders %}
<p class="is-size-4">Livraison à venir, date limite de commande dépassée</p>
<table class="table">
<thead>
<tr>
<th>Nom</th>
<th>Livraison</th>
<th>Fin des commandes</th>
<th>Nombre de commandes</th>
<th>Voir</th>
</tr>
</thead>
<tbody>
{% for gr_order in grouped_order_list.crossed_deadline_grouped_orders %}
<tr>
<td><a href="{% url 'order:grouped_order_detail' gr_order.id %}">{{ gr_order }}</a></td>
<td>{{ gr_order.delivery_date }}</td>
<td>{{ gr_order.deadline }}</td>
<td>Nb de commandes</td>
<td><a href="{% url 'order:grouped_order_detail' gr_order.id %}">Détail </a>|<a href="{% url 'order:grouped_order_overview' gr_order.id %}"> Organisation</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if grouped_order_list.old_grouped_orders %}
<p class="is-size-4">Anciennes commandes</p>
<table class="table">
<thead>
<tr>
<th>Nom</th>
<th>Livraison</th>
<th>Fin des commandes</th>
<th>Nombre de commandes</th>
<th>Voir</th>
</tr>
</thead>
<tbody>
{% for gr_order in grouped_order_list.old_grouped_orders %}
<tr>
<td><a href="{% url 'order:grouped_order_detail' gr_order.id %}">{{ gr_order }}</a></td>
<td>{{ gr_order.delivery_date }}</td>
<td>{{ gr_order.deadline }}</td>
<td>Nb de commandes</td>
<td><a href="{% url 'order:grouped_order_detail' gr_order.id %}">Détail </a>|<a href="{% url 'order:grouped_order_overview' gr_order.id %}"> Organisation</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% else %}
<p>Pas de commande groupée pour l'instant</p>
{% endif %}
{% endblock %}