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
+12 -21
View File
@@ -45,28 +45,21 @@
<div class="flex items-center space-x-2 justify-end">
<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_system_document_delete', { 'uuid': document.uuid })
}) }}>
hx-get="{{ path('app_admin_system_document_delete', { 'uuid': document.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('delete') }}
</button>
<button type="button"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Dokument ersetzen',
'url': path('app_admin_system_document_replace', { 'uuid': document.uuid })
}) }}>
hx-get="{{ path('app_admin_system_document_replace', { 'uuid': document.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('refresh') }}
</button>
<button type="button"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Dokument umbenennen',
'url': path('app_admin_system_document_edit', { 'uuid': document.uuid })
}) }}>
hx-get="{{ path('app_admin_system_document_edit', { 'uuid': document.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('edit') }}
</button>
<a href="{{ path('app_common_download', { 'uuid': document.uuid }) }}"
@@ -90,11 +83,9 @@
</div>
<button type="button"
class="btn"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Dokumente hinzufügen',
'url': path('app_admin_system_document_upload')
}) }}>
hx-get="{{ path('app_admin_system_document_upload') }}"
hx-target="body"
hx-swap="beforeend">
Dokumente hinzufügen
</button>
{% endblock %}