neptune/core/templates/modals/context_table.html

39 lines
1.2 KiB
HTML
Raw Normal View History

<article class="table-container" id="modal-context-table">
2022-08-09 06:20:30 +00:00
<table class="table">
<thead>
<th></th>
</thead>
<tbody>
{% for item in object_list %}
<tr>
<td>{{ item.time }}</td>
<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>
<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 }}"}'
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>