code: upgrade to axum 0.7, working on repo info system

This commit is contained in:
2024-01-26 11:26:47 +01:00
parent 0adae154c8
commit 9f4067e94c
11 changed files with 389 additions and 82 deletions

View File

@@ -10,23 +10,42 @@
{% endblock %}
{% if item_list %}
{% set item_keys = item_info.display_list or item_list|table_keys %}
{% if item_info.lookup_key in item_keys %}
{% set primary_key = item_info.lookup_key %}
{% endif %}
<div class="ui short scrolling container">
<table class="ui very compact celled table head stuck unstackable">
<caption>Table Caption</caption>
<caption>{{ item_info.name|none(content) }}</caption>
<thead>
<tr>
<th>Header1</th>
<th>Header2</th>
<th>Header3</th>
{% for key in item_keys %}
{% if key==primary_key %}
<th class="blue"><i class="key icon"></i>
{{ key|capitalize }}
</th>
{% else %}
<th>{{ key|capitalize }}</th>
{% endif %}
{% endfor %}
</tr>
</thead>
<tbody>
{% for item in item_list %}
<tr>
<td>{{ item.name}}</td>
<td>{{ item.age }}</td>
<td>{{ item }}</td>
{% for key in item_keys %}
{% if key==primary_key %}
<td class="selectable warning">
<a href="#">{{ item[key] }}</a>
</td>
{% else %}
<td>{{ item[key] }}</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
@@ -34,13 +53,6 @@
</tfoot>
</table>
</div>
{% set x="name" %}
<li>{{ item[x] }}</li>
</ul>
{% else %}
No Items found.
{% endif %}