Make hooks/callbacks inherit type
This commit is contained in:
@@ -20,9 +20,9 @@
|
||||
<div class="buttons">
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-get="{% url 'hook_action' hook_id=item.id %}"
|
||||
hx-get="{% url 'hook_action' type=type hook_id=item.id %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#modals-here"
|
||||
hx-target="#{{ type }}s-here"
|
||||
class="button is-info">
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
@@ -32,7 +32,7 @@
|
||||
</button>
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-delete="{% url 'hook_action' hook_id=item.id %}"
|
||||
hx-delete="{% url 'hook_action' type=type hook_id=item.id %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#hooks-table"
|
||||
class="button is-danger">
|
||||
@@ -42,15 +42,30 @@
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
<a href="{% url 'callbacks' type='{{ type }}' hook_id=item.id %}"><button
|
||||
class="button is-success">
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
{% if type == 'page' %}
|
||||
<a href="{% url 'callbacks' type=type hook_id=item.id %}"><button
|
||||
class="button is-success">
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</a>
|
||||
</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-get="{% url 'callbacks' type=type hook_id=item.id %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#{{ type }}s-here"
|
||||
class="button is-success">
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user