Make hooks/callbacks inherit type
This commit is contained in:
1
core/templates/partials/close-modal.html
Normal file
1
core/templates/partials/close-modal.html
Normal file
@@ -0,0 +1 @@
|
||||
<button class="modal-close is-large" aria-label="close"></button>
|
||||
3
core/templates/partials/close-widget.html
Normal file
3
core/templates/partials/close-widget.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<i
|
||||
class="fa-solid fa-xmark has-text-grey-light float-right"
|
||||
onclick='grid.removeWidget("widget-{{ unique }}");'></i>
|
||||
3
core/templates/partials/close-window.html
Normal file
3
core/templates/partials/close-window.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<i
|
||||
class="fa-solid fa-xmark has-text-grey-light float-right"
|
||||
data-script="on click remove the closest <nav/>"></i>
|
||||
@@ -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