mirror of
https://github.com/almet/copanier.git
synced 2025-04-28 19:42:37 +02:00
Allow the table to extend right without expending all the body
This commit is contained in:
parent
b68d75b5a0
commit
0d1352df9f
2 changed files with 44 additions and 36 deletions
|
@ -271,10 +271,7 @@ select:focus {
|
|||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
border-bottom: 1px solid #aaa;
|
||||
overflow-x: auto;
|
||||
}
|
||||
tr {
|
||||
height: 30px;
|
||||
|
@ -285,6 +282,7 @@ th {
|
|||
line-height: 1rem;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
td + td {
|
||||
border-left: 1px solid white;
|
||||
|
@ -335,6 +333,7 @@ article.order {
|
|||
margin-right: auto;
|
||||
}
|
||||
table.order th.product {
|
||||
min-width: 10rem;
|
||||
width: inherit;
|
||||
}
|
||||
td.with-input {
|
||||
|
@ -343,6 +342,13 @@ td.with-input {
|
|||
td.with-input input {
|
||||
width: 100%;
|
||||
}
|
||||
article.delivery {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
article.delivery th.person {
|
||||
max-width: 7rem;
|
||||
}
|
||||
hr {
|
||||
background-color: #dbdbdb;
|
||||
border: none;
|
||||
|
|
|
@ -3,22 +3,24 @@
|
|||
{% block body %}
|
||||
<h3>{{ delivery.producer }} {% if delivery.is_open %}<a class="button" href="/livraison/{{ delivery.id }}/commander">Ma commande</a>{% endif %}</h3>
|
||||
{% include "includes/delivery_head.html" %}
|
||||
<table class="delivery">
|
||||
<article class="delivery">
|
||||
<table class="delivery">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="ref">Référence</th>
|
||||
<th class="product">Produit</th>
|
||||
<th class="price">Prix</th>
|
||||
<th class="amount">Total</th>
|
||||
{% for email, order in delivery.orders.items() %}
|
||||
<th class="person"><a href="/livraison/{{ delivery.id }}/commander?email={{ email }}" title="{{ email }}">{{ email }}</a></th>
|
||||
{% endfor %}
|
||||
<th class="amount">Total</th>
|
||||
</tr>
|
||||
{% for product in delivery.products %}
|
||||
<tr>
|
||||
<th class="product">{{ product.ref }}</th>
|
||||
<th class="product">{{ product.name }}</th>
|
||||
<td>{{ product.price }} €</td>
|
||||
<th>{{ delivery.product_wanted(product) }}</th>
|
||||
{% for email, order in delivery.orders.items() %}
|
||||
{% if product.ref in order.products %}
|
||||
<td>{{ order.products[product.ref].wanted }}</td>
|
||||
|
@ -26,17 +28,17 @@
|
|||
<td>—</td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<th>{{ delivery.product_wanted(product) }}</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr><th class="total"><i class="icon-pricetags"></i> Total</th><td>—</td><td>—</td>
|
||||
<td class="total">{{ delivery.total }} €</td>
|
||||
{% for email, order in delivery.orders.items() %}
|
||||
<td>{{ order.total(delivery.products) }} €</td>
|
||||
{% endfor %}
|
||||
<td class="total">{{ delivery.total }} €</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</article>
|
||||
<hr>
|
||||
<ul class="toolbox">
|
||||
<li>
|
||||
|
|
Loading…
Reference in a new issue