fournee/fournée/templates/admin/fournée_change_form.html

107 lines
2.8 KiB
HTML
Raw Normal View History

2024-04-30 12:27:17 +02:00
{% extends "admin/change_form.html" %}
{% load i18n admin_urls static admin_modify fournée_modify %}
{% if save_on_top %}{% block submit_buttons_top %}{% fournée_submit_row %}{% endblock %}{% endif %}
{% block submit_buttons_bottom %}{% fournée_submit_row %}{% endblock %}
{% block after_field_sets %}
{% if commandes %}
<h2>Résumé des commandes</h2>
<ul>
{% for commande in commandes %}
<li>{{ commande }}</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}
{% block after_related_objects %}
{% if coulées %}
<h2>Résumé des coulées</h2>
<table>
<thead>
<tr>
<th></th>
{% for i, _ in ingrédients %}
<th scope="col" style="text-align:center">{{ i }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
<tr>
{% for p in totaux_coulées %}
{% if forloop.first %}
<th>Total pain : {{p}} kg</th>
{% else %}
<th scope="col" style="text-align:center">{{ p }}</th>
{% endif %}
{% endfor %}
</tr>
</tbody>
</table>
<div style="display:inline-grid">
{% for problems, ingrédients, quantités in coulées %}
<h3 style="margin-top: 2em{% if problems %}; color: var(--delete-button-hover-bg);{% endif %}">{{ quantités.0 }}{% if problems %} ({{ problems }}){% endif %}</h3>
<table>
<thead>
<tr>
<th></th>
{% for i in ingrédients %}
<th scope="col" style="text-align:center">{{ i }}</th>
{% endfor %}
</tr>
2024-04-30 12:27:17 +02:00
</thead>
<tbody>
<tr>
{% for q in quantités %}
{% if forloop.first %}
<th scope="row">{{ q.pâte.nom }}</th>
{% else %}
<td style="text-align:center">{{ q }}</td>
{% endif %}
2024-04-30 12:27:17 +02:00
{% endfor %}
</tr>
</tbody>
</table>
{% endfor %}
</div>
2024-04-30 12:27:17 +02:00
{% endif %}
{% if divisions %}
<hr>
<h2>Résumé des divisions</h2>
<table>
<thead>
<tr>
<th></th>
{% for problems, p in pains %}
<th scope="col" style="text-align:center{% if problems %}; color: var(--delete-button-hover-bg);{% endif %}">{{ p }}{% if problems %}<br>Sans coulée !!{% endif %}</th>
2024-04-30 12:27:17 +02:00
{% endfor %}
</tr>
</thead>
<tr>
{% for p in totaux_divisions %}
{% if forloop.first %}
<th>Total pain : {{p}} kg</th>
{% else %}
<th scope="col" style="text-align:center">{{ p }}</th>
{% endif %}
{% endfor %}
</tr>
2024-04-30 12:27:17 +02:00
<tbody>
<tr></tr>
2024-04-30 12:27:17 +02:00
{% for commande in divisions %}
<tr>
{% for p in commande %}
{% if forloop.first %}<th scope="row">{% else %}<td style="text-align:center">{% endif %}
{{ p }}
{% if forloop.first %}</th>{% else %}</td>{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
<p></p>
{% endif %}
{% endblock %}