Implement a hooks page

This commit is contained in:
2022-10-14 07:20:30 +01:00
parent 5c67a3a707
commit 83808dfa52
16 changed files with 109 additions and 83 deletions

View File

@@ -0,0 +1,47 @@
<div class="buttons">
<button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-get="#"
hx-trigger="click"
hx-target="#modals-here"
class="button is-info">
<span class="icon-text">
<span class="icon">
<i class="fa-solid fa-plus"></i>
</span>
<span>Hook</span>
</span>
</button>
</div>
{% include 'partials/notify.html' %}
<table class="table is-fullwidth is-hoverable">
<thead>
<th>user</th>
<th>hook</th>
<th>received hooks</th>
<th>actions</th>
</thead>
{% for item in hooks %}
<tr>
<td>{{ item.user }}</td>
<td>{{ item.hook }}</td>
<td>{{ item.received }}</td>
<td>
<button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-get="#"
hx-trigger="click"
hx-target="#modals-here"
class="button is-info">
<span class="icon-text">
<span class="icon">
<i class="fa-solid fa-pencil"></i>
</span>
<span>Hook</span>
</span>
</button>
</td>
</tr>
{% endfor %}
</table>

View File

@@ -3,7 +3,7 @@
<div class="buttons">
<button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-get="{% url 'modal' %}"
hx-get="{% url 'hooks' type='modal' %}"
hx-trigger="click"
hx-target="#modals-here"
class="button is-info">
@@ -16,7 +16,7 @@
</button>
<button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-get="{% url 'widget' %}"
hx-get="{% url 'hooks' type='widget' %}"
hx-trigger="click"
hx-target="#widgets-here"
class="button is-info">
@@ -29,7 +29,7 @@
</button>
<button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-get="{% url 'window' %}"
hx-get="{% url 'hooks' type='window' %}"
hx-trigger="click"
hx-target="#items-here"
hx-swap="afterend"