Small templates improvements for books and rs

This commit is contained in:
2025-01-05 15:28:42 +01:00
parent 206b9aea57
commit ead9fe649b
2 changed files with 39 additions and 21 deletions

View File

@@ -108,16 +108,6 @@
<th scope="row">Publication year</th>
<td>{{ book.publication_year|default:"-" }}</td>
</tr>
{% if request.user.is_staff %}
<tr>
<th scope="row">Purchase date</th>
<td>{{ book.purchase_date|default:"-" }}</td>
</tr>
<tr>
<th scope="row">Price ({{ site_conf.currency }})</th>
<td>{{ book.price|default:"-" }}</td>
</tr>
{% endif %}
{% if book.description %}
<tr>
<th class="w-33" scope="row">Description</th>
@@ -126,6 +116,25 @@
{% endif %}
</tbody>
</table>
{% if request.user.is_staff %}
<table class="table table-striped">
<thead>
<tr>
<th colspan="2" scope="row">Purchase</th>
</tr>
</thead>
<tbody class="table-group-divider">
<tr>
<th class="w-33" scope="row">Purchase date</th>
<td>{{ book.purchase_date|default:"-" }}</td>
</tr>
<tr>
<th scope="row">Price ({{ site_conf.currency }})</th>
<td>{{ book.price|default:"-" }}</td>
</tr>
</tbody>
</table>
{% endif %}
{% if properties %}
<table class="table table-striped">
<thead>

View File

@@ -73,7 +73,7 @@
<table class="table table-striped">
<thead>
<tr>
<th colspan="2" scope="row">Data</th>
<th colspan="2" scope="row">Rolling stock</th>
</tr>
</thead>
<tbody class="table-group-divider">
@@ -182,16 +182,6 @@
<th scope="row">Production year</th>
<td>{{ rolling_stock.production_year|default:"-" }}</td>
</tr>
{% if request.user.is_staff %}
<tr>
<th scope="row">Purchase date</th>
<td>{{ rolling_stock.purchase_date|default:"-" }}</td>
</tr>
<tr>
<th scope="row">Price ({{ site_conf.currency }})</th>
<td>{{ rolling_stock.price|default:"-" }}</td>
</tr>
{% endif %}
{% if rolling_stock.description %}
<tr>
<th class="w-33" scope="row">Description</th>
@@ -200,6 +190,25 @@
{% endif %}
</tbody>
</table>
{% if request.user.is_staff %}
<table class="table table-striped">
<thead>
<tr>
<th colspan="2" scope="row">Purchase</th>
</tr>
</thead>
<tbody class="table-group-divider">
<tr>
<th class="w-33" scope="row">Purchase date</th>
<td>{{ rolling_stock.purchase_date|default:"-" }}</td>
</tr>
<tr>
<th scope="row">Price ({{ site_conf.currency }})</th>
<td>{{ rolling_stock.price|default:"-" }}</td>
</tr>
</tbody>
</table>
{% endif %}
{% if properties %}
<table class="table table-striped">
<thead>