Group items in meta by field

This commit is contained in:
2022-07-21 13:53:02 +01:00
parent 8710c66e05
commit 70a6221b0c
2 changed files with 10 additions and 55 deletions

View File

@@ -1,63 +1,19 @@
<div id="meta">
<div class="content" style="max-height: 30em; overflow: auto;">
<div class="table-container">
{% for item in meta %}
<table class="table is-striped is-fullwidth is-hoverable">
{% for key,items in meta.items %}
<th><strong>{{ key }}</strong></th>
<table class="table is-fullwidth is-hoverable">
<tbody>
{% if 'ts' in item %}
{% for item in items %}
<tr>
<th>ts</th>
<td>
<p>{{ item.date }}</p>
<p>{{ item.time }}</p>
{{ item }}
</td>
</tr>
{% endif %}
{% if 'nick' in item %}
<tr>
<th>nick</th>
<td>{{ item.nick }}</td>
</tr>
{% endif %}
{% if 'ident' in item %}
<tr>
<th>ident</th>
<td>{{ item.ident }}</td>
</tr>
{% endif %}
{% if 'host' in item %}
<tr>
<th>host</th>
<td>{{ item.host }}</td>
</tr>
{% endif %}
{% if 'realname' in item %}
<tr>
<th>realname</th>
<td>{{ item.realname }}</td>
</tr>
{% endif %}
{% if 'status' in item %}
<tr>
<th>status</th>
<td>{{ item.status }}</td>
</tr>
{% endif %}
{% if 'server' in item %}
<tr>
<th>server</th>
<td>{{ item.server }}</td>
</tr>
{% endif %}
{% if 'channel' in item %}
<tr>
<th>channel</th>
<td>{{ item.channel }}</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
<hr/>
{% endfor %}
</div>
</div>