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

100 lines
2.6 KiB
HTML

{% 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>
<th>Totaux</th>
{% for p in totaux_coulées %}
<th scope="col" style="text-align:center">{{ p }}</th>
{% 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>
</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 %}
{% endfor %}
</tr>
</tbody>
</table>
{% endfor %}
</div>
{% endif %}
{% if divisions %}
<hr>
<h2>Résumé des divisions</h2>
<table>
<thead>
<tr>
<th></th>
{% for problems, p in pains %}
<th scope="col"{% if problems %} style="color: var(--delete-button-hover-bg);"{% endif %}>{{ p }}{% if problems %}<br>sans coulée{% endif %}</th>
{% endfor %}
</tr>
<tr>
<th>Totaux</th>
{% for p in totaux_divisions %}
<th scope="col" style="text-align:center">{{ p }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% 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 %}