48 lines
1.3 KiB
HTML
48 lines
1.3 KiB
HTML
{# vim: set filetype=html: #}
|
|
{% extends "base" %}
|
|
{% block body %}
|
|
<div class="accordion" id="my_tables">
|
|
{% for tname in tnames %}
|
|
{% set clms = columns[loop.index0] %}
|
|
{% set rws = rows[loop.index0] %}
|
|
{% set tid = tids[loop.index0] %}
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header">
|
|
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#acc_{{ tid }}" aria-expanded="false" aria-controls="acc_{{ tid }}">
|
|
{{ tname }}
|
|
</button>
|
|
</h2>
|
|
<div id="acc_{{ tid }}" class="accordion-collapse collapse" data-bs-parent="#my_tables">
|
|
<div class="accordion-body">
|
|
<div class="row justify-content-between">
|
|
<div class="col-auto"><h3>{{ tname }}</h3></div><div class="col-auto"><a class="btn btn-primary" href="/table/{{ tid }}">Open</a></div>
|
|
</div>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
{% for clm in clms %}
|
|
<th>{{ clm }}</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for row in rws %}
|
|
<tr>
|
|
<td>{{ loop.index }}</td>
|
|
{% for clm in clms %}
|
|
<td>{{ row[loop.index0] }}</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{% endblock body %}
|
|
|