mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-05-07 06:11:52 +02:00
62 lines
1.8 KiB
HTML
62 lines
1.8 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block title %}Mes lieux de livraison{% endblock %}
|
|
|
|
{% block content %}
|
|
<p class="desktop-hidden mobile-content-title">
|
|
{% block content_title %}Lieux de distribution que vous organisez{% endblock %}
|
|
</p>
|
|
<div class="buttons is-pulled-right">
|
|
<a class="button is-primary" href="{% url 'order:place_create' %}">
|
|
<i class="fa fa-plus-circle mr-3" aria-hidden="true"></i>
|
|
Créer un nouveau lieu de distribution</a>
|
|
</div>
|
|
{% if context.places %}
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Lieu</th>
|
|
<th>Commandes</th>
|
|
<th>Description</th>
|
|
<th>URL</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for place in context.places %}
|
|
<tr>
|
|
<td>
|
|
(<a href="{% url 'order:place_update' place.code %}">modifier</a>) <a title="Détail du lieu de distribution" href="{% url 'order:place_overview' place.code %}">{{ place }}</a>
|
|
</td>
|
|
<td>
|
|
{% if place.code in context.orders.keys %}
|
|
{% for place_code, place_orders in context.orders.items %}
|
|
{% if place_code == place.code %}
|
|
{% for order in place_orders %}
|
|
{% url 'order:grouped_order_detail' code=order.code as order_url %}
|
|
{% if order_url %}
|
|
<a href="{{ order_url }}">{{order.name}}</a><br>
|
|
{% else %}
|
|
{{ order.name }}<br>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% else %}
|
|
Aucune
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{{ place.description }}
|
|
</td>
|
|
<td>
|
|
{{ place.code }}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p>Pas de lieux de distribution pour l'instant</p>
|
|
{% endif %}
|
|
{% endblock %}
|