mirror of
https://github.com/almet/copanier.git
synced 2025-04-28 19:42:37 +02:00
Use thead and tbody in tables
This commit is contained in:
parent
d604259f57
commit
5deae74c9a
4 changed files with 26 additions and 12 deletions
|
@ -337,12 +337,15 @@ th.total {
|
||||||
tr:nth-child(even) {
|
tr:nth-child(even) {
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
}
|
}
|
||||||
tr:nth-child(1) {
|
thead tr {
|
||||||
background-color: #3498db;
|
background-color: #3498db;
|
||||||
}
|
}
|
||||||
tr:nth-child(1) * {
|
thead tr * {
|
||||||
color: #f1f1f1;
|
color: #f1f1f1;
|
||||||
}
|
}
|
||||||
|
thead th + th {
|
||||||
|
border-left: 1px solid white;
|
||||||
|
}
|
||||||
article.order {
|
article.order {
|
||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
|
|
@ -8,7 +8,10 @@
|
||||||
<p><strong>Manquant</strong> {{ delivery.product_missing(product) }}</p>
|
<p><strong>Manquant</strong> {{ delivery.product_missing(product) }}</p>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<table>
|
<table>
|
||||||
|
<thead>
|
||||||
<tr><th>Personne</th><th class="amount">Commande</th><th class="amount">Ajustement</th></tr>
|
<tr><th>Personne</th><th class="amount">Commande</th><th class="amount">Ajustement</th></tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
{% for email, order in delivery.orders.items() %}
|
{% for email, order in delivery.orders.items() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ email }}</td>
|
<td>{{ email }}</td>
|
||||||
|
@ -16,6 +19,7 @@
|
||||||
<td class="with-input"><input type="number" min=0 name="{{ email }}" value="{{ order[product].adjustment }}"></td>
|
<td class="with-input"><input type="number" min=0 name="{{ email }}" value="{{ order[product].adjustment }}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<input type="submit" value="Enregistrer">
|
<input type="submit" value="Enregistrer">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{% include "includes/delivery_head.html" %}
|
{% include "includes/delivery_head.html" %}
|
||||||
<article class="delivery">
|
<article class="delivery">
|
||||||
<table class="delivery">
|
<table class="delivery">
|
||||||
<tbody>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="ref">Référence</th>
|
<th class="ref">Référence</th>
|
||||||
<th class="product">Produit</th>
|
<th class="product">Produit</th>
|
||||||
|
@ -24,6 +24,8 @@
|
||||||
</th>
|
</th>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
{% for product in delivery.products %}
|
{% for product in delivery.products %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="ref">{{ product.ref }}</td>
|
<td class="ref">{{ product.ref }}</td>
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
{% include "includes/delivery_head.html" %}
|
{% include "includes/delivery_head.html" %}
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<table class="order">
|
<table class="order">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="product">Produit</th>
|
<th class="product">Produit</th>
|
||||||
<th class="price">Prix</th>
|
<th class="price">Prix</th>
|
||||||
|
@ -13,7 +14,10 @@
|
||||||
<th class="packing">Conditionnement</th>
|
<th class="packing">Conditionnement</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<th class="amount">Quantité</th>
|
<th class="amount">Quantité</th>
|
||||||
{% if delivery.status == delivery.ADJUSTMENT %}<th class="amount">Ajustement</th>{% endif %}</tr>
|
{% if delivery.status == delivery.ADJUSTMENT %}<th class="amount">Ajustement</th>{% endif %}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
{% for product in delivery.products %}
|
{% for product in delivery.products %}
|
||||||
<tr>
|
<tr>
|
||||||
<th class="product">{{ product }}
|
<th class="product">{{ product }}
|
||||||
|
@ -33,6 +37,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>Total: {{ order.total(delivery.products) if order else 0 }} €</p>
|
<p>Total: {{ order.total(delivery.products) if order else 0 }} €</p>
|
||||||
{% if delivery.is_passed %}
|
{% if delivery.is_passed %}
|
||||||
|
|
Loading…
Reference in a new issue