neptune/core/templates/modals/context_table.html

48 lines
1.7 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>
{% 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 %}
2022-08-09 06:20:30 +00:00
<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 }}",
2022-08-03 06:20:30 +00:00
"mtype": "{{ mtype }}",
"nick": "{{ nick }}"}'
2022-08-09 06:20:30 +00:00
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>