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 {
|
table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
width: 100%;
|
|
||||||
table-layout: fixed;
|
|
||||||
border-bottom: 1px solid #aaa;
|
border-bottom: 1px solid #aaa;
|
||||||
overflow-x: auto;
|
|
||||||
}
|
}
|
||||||
tr {
|
tr {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
@ -285,6 +282,7 @@ th {
|
||||||
line-height: 1rem;
|
line-height: 1rem;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
td + td {
|
td + td {
|
||||||
border-left: 1px solid white;
|
border-left: 1px solid white;
|
||||||
|
@ -335,6 +333,7 @@ article.order {
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
table.order th.product {
|
table.order th.product {
|
||||||
|
min-width: 10rem;
|
||||||
width: inherit;
|
width: inherit;
|
||||||
}
|
}
|
||||||
td.with-input {
|
td.with-input {
|
||||||
|
@ -343,6 +342,13 @@ td.with-input {
|
||||||
td.with-input input {
|
td.with-input input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
article.delivery {
|
||||||
|
width: 100%;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
article.delivery th.person {
|
||||||
|
max-width: 7rem;
|
||||||
|
}
|
||||||
hr {
|
hr {
|
||||||
background-color: #dbdbdb;
|
background-color: #dbdbdb;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
|
@ -3,40 +3,42 @@
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h3>{{ delivery.producer }} {% if delivery.is_open %}<a class="button" href="/livraison/{{ delivery.id }}/commander">Ma commande</a>{% endif %}</h3>
|
<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" %}
|
{% include "includes/delivery_head.html" %}
|
||||||
<table class="delivery">
|
<article class="delivery">
|
||||||
<tbody>
|
<table class="delivery">
|
||||||
<tr>
|
<tbody>
|
||||||
<th class="ref">Référence</th>
|
<tr>
|
||||||
<th class="product">Produit</th>
|
<th class="ref">Référence</th>
|
||||||
<th class="price">Prix</th>
|
<th class="product">Produit</th>
|
||||||
{% for email, order in delivery.orders.items() %}
|
<th class="price">Prix</th>
|
||||||
<th class="person"><a href="/livraison/{{ delivery.id }}/commander?email={{ email }}" title="{{ email }}">{{ email }}</a></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 %}
|
||||||
|
</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>
|
||||||
|
{% else %}
|
||||||
|
<td>—</td>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<th class="amount">Total</th>
|
<tr><th class="total"><i class="icon-pricetags"></i> Total</th><td>—</td><td>—</td>
|
||||||
</tr>
|
<td class="total">{{ delivery.total }} €</td>
|
||||||
{% for product in delivery.products %}
|
{% for email, order in delivery.orders.items() %}
|
||||||
<tr>
|
<td>{{ order.total(delivery.products) }} €</td>
|
||||||
<th class="product">{{ product.ref }}</th>
|
{% endfor %}
|
||||||
<th class="product">{{ product.name }}</th>
|
</tr>
|
||||||
<td>{{ product.price }} €</td>
|
</tbody>
|
||||||
{% for email, order in delivery.orders.items() %}
|
</table>
|
||||||
{% if product.ref in order.products %}
|
</article>
|
||||||
<td>{{ order.products[product.ref].wanted }}</td>
|
|
||||||
{% else %}
|
|
||||||
<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>
|
|
||||||
{% for email, order in delivery.orders.items() %}
|
|
||||||
<td>{{ order.total(delivery.products) }} €</td>
|
|
||||||
{% endfor %}
|
|
||||||
<td class="total">{{ delivery.total }} €</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<hr>
|
<hr>
|
||||||
<ul class="toolbox">
|
<ul class="toolbox">
|
||||||
<li>
|
<li>
|
||||||
|
|
Loading…
Reference in a new issue