fournee/fournée/templates/admin/fournée_change_form.html
2024-05-09 09:57:01 +02:00

92 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>
{% for problems, coulée in coulées %}
<tr{% if problems %} style="color: var(--delete-button-hover-bg);"{% endif %}>
{% for i in coulée %}
{% if forloop.first %}<th scope="row">{% else %}<td style="text-align:center">{% endif %}
{{ i }}
{% if forloop.first %}{% if problems %} ({{ problems }}){% endif %}</th>{% else %}</td>{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr><td colspan={{totaux_coulées | length | add:"1" }}></td></tr>
<tr><td colspan={{totaux_coulées | length | add:"1" }}></td></tr>
<tr>
<th>Totaux</th>
{% for p in totaux_coulées %}
<th scope="col" style="text-align:center">{{ p }}</th>
{% endfor %}
</tr>
</tfoot>
</table>
<p></p>
{% 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>
</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>
<tfoot>
<tr><td colspan={{totaux_divisions | length | add:"1" }}></td></tr>
<tr><td colspan={{totaux_divisions | length | add:"1" }}></td></tr>
<tr>
<th>Totaux</th>
{% for p in totaux_divisions %}
<th scope="col" style="text-align:center">{{ p }}</th>
{% endfor %}
</tr>
</tfoot>
</table>
<p></p>
{% endif %}
{% endblock %}