Wrap tables in tbody

This commit is contained in:
Mark Veidemanis 2022-07-21 19:16:59 +01:00
parent 70a6221b0c
commit 3cb908e6ae
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
2 changed files with 58 additions and 54 deletions

View File

@ -3,26 +3,28 @@
<div id="channels"> <div id="channels">
<div class="content" style="max-height: 30em; overflow: auto;"> <div class="content" style="max-height: 30em; overflow: auto;">
<table class="table is-fullwidth is-hoverable"> <table class="table is-fullwidth is-hoverable">
{% for chan in chans %} <tbody>
<tr> {% for chan in chans %}
<td> <tr>
<span <td>
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' <span
hx-post="{% url 'modal_drilldown' %}" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}' hx-post="{% url 'modal_drilldown' %}"
hx-target="#modals-here" hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}'
hx-trigger="click" hx-target="#modals-here"
class="button is-small"> hx-trigger="click"
{{ chan }} class="button is-small">
</span> {{ chan }}
{% if chan in num_users %}
<span class="tag">
{{ num_users|index:chan }}
</span> </span>
{% endif %} {% if chan in num_users %}
</td> <span class="tag">
</tr> {{ num_users|index:chan }}
{% endfor %} </span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table> </table>
</div> </div>
</div> </div>

View File

@ -11,42 +11,44 @@
<div id="nicks"> <div id="nicks">
<div class="content" style="max-height: 30em; overflow: auto;"> <div class="content" style="max-height: 30em; overflow: auto;">
<table class="table is-fullwidth is-hoverable"> <table class="table is-fullwidth is-hoverable">
{% for nick in nicks %} <tbody>
<tr> {% for nick in nicks %}
<td> <tr>
{% if nick in online %} <td>
{% if online|index:nick is True %} {% if nick in online %}
<span class="icon has-text-success has-tooltip-success" data-tooltip="Online"> {% if online|index:nick is True %}
<i class="fa-solid fa-circle"></i> <span class="icon has-text-success has-tooltip-success" data-tooltip="Online">
</span> <i class="fa-solid fa-circle"></i>
{% elif online|index:nick is False %} </span>
<span class="icon has-text-danger has-tooltip-danger" data-tooltip="Offline"> {% elif online|index:nick is False %}
<i class="fa-solid fa-circle"></i> <span class="icon has-text-danger has-tooltip-danger" data-tooltip="Offline">
</span> <i class="fa-solid fa-circle"></i>
{% else %} </span>
<span class="icon has-text-warning has-tooltip-warning" data-tooltip="Unknown"> {% else %}
<i class="fa-solid fa-circle"></i> <span class="icon has-text-warning has-tooltip-warning" data-tooltip="Unknown">
</span> <i class="fa-solid fa-circle"></i>
</span>
{% endif %}
{% endif %} {% endif %}
{% endif %} <span
<span hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' hx-post="{% url 'modal_drilldown' %}"
hx-post="{% url 'modal_drilldown' %}" hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}'
hx-vals='{"net": "{{ net }}", "nick": "{{ nick }}", "channel": "{{ chan }}"}' hx-target="#modals-here"
hx-target="#modals-here" hx-trigger="click"
hx-trigger="click" class="button is-small">
class="button is-small"> {{ nick }}
{{ nick }} </span>
</span> <a
<a class="icon has-text-info has-tooltip-info"
class="icon has-text-info has-tooltip-info" data-tooltip="Populate search"
data-tooltip="Populate search" onclick="document.getElementById('query').value='nick: {{ nick }}';">
onclick="document.getElementById('query').value='nick: {{ nick }}';"> <i class="fa-solid fa-arrow-left-long-to-line"></i>
<i class="fa-solid fa-arrow-left-long-to-line"></i> </a>
</a> </td>
</td> </tr>
</tr> {% endfor %}
{% endfor %} </tbody>
</table> </table>
</div> </div>
</div> </div>