48 lines
1.7 KiB
HTML
48 lines
1.7 KiB
HTML
<article class="table-container" id="modal-context-table">
|
|
<table class="table">
|
|
<thead>
|
|
<th></th>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in object_list %}
|
|
<tr>
|
|
<td>{{ item.time }}</td>
|
|
{% if query is True and item.type == 'self' %}
|
|
<td
|
|
class="has-tooltip-right {% if item.online is True %}has-text-success{% elif item.online is False %}has-text-danger{% else %}has-text-warning{% endif %}"
|
|
data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.channel }}</td>
|
|
{% else %}
|
|
<td
|
|
class="has-tooltip-right {% if item.online is True %}has-text-success{% elif item.online is False %}has-text-danger{% else %}has-text-warning{% endif %}"
|
|
data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.nick }}</td>
|
|
{% endif %}
|
|
<td class="wrap">{{ item.msg }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</article>
|
|
{% if object_list %}
|
|
<div
|
|
class="modal-refresh"
|
|
style="display: none;"
|
|
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
|
hx-post="{% url 'modal_context_table' %}"
|
|
hx-vals='{"net": "{{ net }}",
|
|
"num": "{{ num }}",
|
|
"src": "{{ src }}",
|
|
"channel": "{{ channel }}",
|
|
"time": "{{ time }}",
|
|
"date": "{{ date }}",
|
|
"index": "{{ index }}",
|
|
"type": "{{ type }}",
|
|
"mtype": "{{ mtype }}",
|
|
"nick": "{{ nick }}"}'
|
|
hx-target="#modal-context-table"
|
|
hx-trigger="every 5s">
|
|
</div>
|
|
{% endif %}
|
|
<script>
|
|
var modal_event = new Event('restore-modal-scroll');
|
|
document.dispatchEvent(modal_event);
|
|
</script> |