feat: integrate with htmx

This commit is contained in:
Björn Fromme
2024-02-07 10:15:59 +01:00
parent 4d1799ca49
commit 1e572606f8
154 changed files with 1447 additions and 1461 deletions
+6 -11
View File
@@ -69,22 +69,17 @@
{% if is_granted('DELETE', upload) %}
<button type="button"
class="text-red-500"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du das Dokument wirklich löschen?',
'target-url': path('app_admin_document_delete', { 'uuid': upload.uuid })
}) }}>
hx-get="{{ path('app_admin_document_delete', { 'uuid': upload.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('delete') }}
</button>
{% endif %}
{% if is_granted('CHECK', upload) %}
<button type="button"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Dokumentenstatus bearbeiten',
'url': path('app_admin_document_check', { 'uuid': upload.uuid })
}) }}>
hx-get="{{ path('app_admin_document_check', { 'uuid': upload.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('edit') }}
</button>
{% endif %}