Improve user experience in admin and UI (#45)

This commit is contained in:
2025-01-18 15:37:56 +01:00
committed by GitHub
parent c467fb24ca
commit ddcf06994d
17 changed files with 364 additions and 106 deletions

View File

@@ -7,7 +7,10 @@
<table class="table table-striped">
<thead>
<tr>
<th colspan="2" scope="row">Company</th>
<th scope="row">Company</th>
{% if d.item.freelance %}
<th class="text-end" scope="row"><span class="badge text-bg-secondary">Freelance</span></th>
{% endif %}
</tr>
</thead>
<tbody class="table-group-divider">
@@ -27,7 +30,7 @@
</tr>
<tr>
<th class="w-33" scope="row">Country</th>
<td>{{ d.item.country.name }} <img src="{{ d.item.country.flag }}" alt="{{ d.item.country }}">
<td><img src="{{ d.item.country.flag }}" alt="{{ d.item.country }}"> {{ d.item.country.name }}</td>
</tr>
{% if d.item.freelance %}
<tr>

View File

@@ -24,7 +24,10 @@
<table class="table table-striped">
<thead>
<tr>
<th colspan="2" scope="row">Consist</th>
<th scope="row">Consist</th>
{% if d.item.company.freelance %}
<th class="text-end" scope="row"><span class="badge text-bg-secondary">Freelance</span></th>
{% endif %}
</tr>
</thead>
<tbody class="table-group-divider">

View File

@@ -22,7 +22,10 @@
<table class="table table-striped">
<thead>
<tr>
<th colspan="2" scope="row">Rolling stock</th>
<th scope="row">Rolling stock</th>
{% if d.item.rolling_class.company.freelance %}
<th class="text-end" scope="row"><span class="badge text-bg-secondary">Freelance</span></th>
{% endif %}
</tr>
</thead>
<tbody class="table-group-divider">

View File

@@ -79,7 +79,10 @@
<table class="table table-striped">
<thead>
<tr>
<th colspan="2" scope="row">Data</th>
<th scope="row">Consist</th>
{% if consist.company.freelance %}
<th class="text-end" scope="row"><span class="badge text-bg-secondary">Freelance</span></th>
{% endif %}
</tr>
</thead>
<tbody class="table-group-divider">

View File

@@ -73,7 +73,10 @@
<table class="table table-striped">
<thead>
<tr>
<th colspan="2" scope="row">Rolling stock</th>
<th scope="row">Rolling stock</th>
{% if company.freelance %}
<th class="text-end" scope="row"><span class="badge text-bg-secondary">Freelance</span></th>
{% endif %}
</tr>
</thead>
<tbody class="table-group-divider">
@@ -84,7 +87,13 @@
<tr>
<th scope="row">Company</th>
<td>
<a href="{% url 'filtered' _filter="company" search=company.slug %}">{{ company }}</a> {{ company.extended_name_pp }}
<a href="{% url 'filtered' _filter="company" search=company.slug %}">{{ company }}</a> {{ company.extended_name_pp }}
</td>
</tr>
<tr>
<th scope="row">Country</th>
<td>
<img src="{{ company.country.flag }}" alt="{{ company.country }}"> {{ company.country.name }}
</td>
</tr>
<tr>
@@ -281,7 +290,10 @@
<table class="table table-striped">
<thead>
<tr>
<th colspan="2" scope="row">Company data</th>
<th scope="row">Company data</th>
{% if company.freelance %}
<th class="text-end" scope="row"><span class="badge text-bg-secondary">Freelance</th>
{% endif %}
</tr>
</thead>
<tbody class="table-group-divider">
@@ -293,18 +305,16 @@
{% endif %}
<tr>
<th class="w-33" scope="row">Name</th>
<td><a href="{% url 'filtered' _filter="company" search=company.slug %}">{{ company.name }}</a> {{ company.extended_name_pp }}</td>
<td>
<a href="{% url 'filtered' _filter="company" search=company.slug %}">{{ company.name }}</a> {{ company.extended_name_pp }}
</td>
</tr>
<tr>
<th class="w-33" scope="row">Country</th>
<td>{{ company.country.name }} <img src="{{ company.country.flag }}" alt="{{ company.country }}">
<td>
<img src="{{ company.country.flag }}" alt="{{ company.country }}"> {{ company.country.name }}
</td>
</tr>
{% if company.freelance %}
<tr>
<th class="w-33" scope="row">Notes</th>
<td>A <em>freelance</em> company</td>
</tr>
{% endif %}
</tbody>
</table>
</div>