101 lines
3.4 KiB
HTML
101 lines
3.4 KiB
HTML
{% load cache %}
|
|
{% include 'mixins/partials/notify.html' %}
|
|
{% cache 600 objects_signal_chats request.user.id object_list type %}
|
|
<table
|
|
class="table is-fullwidth is-hoverable"
|
|
hx-target="#{{ context_object_name }}-table"
|
|
id="{{ context_object_name }}-table"
|
|
hx-swap="outerHTML"
|
|
hx-trigger="{{ context_object_name_singular }}Event from:body"
|
|
hx-get="{{ list_url }}">
|
|
<thead>
|
|
<th>number</th>
|
|
<th>uuid</th>
|
|
<th>account</th>
|
|
<th>name</th>
|
|
<th>actions</th>
|
|
</thead>
|
|
{% for item in object_list %}
|
|
<tr>
|
|
<td>{{ item.source_number }}</td>
|
|
<td>
|
|
<a
|
|
class="has-text-grey button nowrap-child"
|
|
onclick="window.prompt('Copy to clipboard: Ctrl+C, Enter', '{{ item.source_uuid }}');">
|
|
<span class="icon" data-tooltip="Copy to clipboard">
|
|
<i class="fa-solid fa-copy" aria-hidden="true"></i>
|
|
</span>
|
|
</a>
|
|
</td>
|
|
<td>{{ item.account }}</td>
|
|
<td>{{ item.source_name }}</td>
|
|
<td>
|
|
<div class="buttons">
|
|
<button
|
|
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
|
hx-delete="{# url 'account_delete' type=type pk=item.id #}"
|
|
hx-trigger="click"
|
|
hx-target="#modals-here"
|
|
hx-swap="innerHTML"
|
|
hx-confirm="Are you sure you wish to unlink {{ item }}?"
|
|
class="button">
|
|
<span class="icon-text">
|
|
<span class="icon">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</span>
|
|
</span>
|
|
</button>
|
|
{% if type == 'page' %}
|
|
<a href="{# url 'signal_contacts' type=type pk=item #}"><button
|
|
class="button">
|
|
<span class="icon-text">
|
|
<span class="icon">
|
|
<i class="fa-solid fa-eye"></i>
|
|
</span>
|
|
</span>
|
|
</button>
|
|
</a>
|
|
<a href="{# url 'signal_chats' type=type pk=item #}"><button
|
|
class="button">
|
|
<span class="icon-text">
|
|
<span class="icon">
|
|
<i class="fa-solid fa-envelope"></i>
|
|
</span>
|
|
</span>
|
|
</button>
|
|
</a>
|
|
{% else %}
|
|
<button
|
|
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
|
hx-get="{# url 'signal_contacts' type=type pk=item #}"
|
|
hx-trigger="click"
|
|
hx-target="#{{ type }}s-here"
|
|
hx-swap="innerHTML"
|
|
class="button">
|
|
<span class="icon-text">
|
|
<span class="icon">
|
|
<i class="fa-solid fa-eye"></i>
|
|
</span>
|
|
</span>
|
|
</button>
|
|
<button
|
|
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
|
hx-get="{# url 'signal_chats' type=type pk=item #}"
|
|
hx-trigger="click"
|
|
hx-target="#{{ type }}s-here"
|
|
hx-swap="innerHTML"
|
|
class="button">
|
|
<span class="icon-text">
|
|
<span class="icon">
|
|
<i class="fa-solid fa-envelope"></i>
|
|
</span>
|
|
</span>
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
</table>
|
|
{% endcache %} |