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 -16
View File
@@ -39,20 +39,17 @@
<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 die Ansprechperson wirklich löschen?',
'target-url': path('app_admin_system_contact_delete', { 'id': contact.id })
}) }}>
title="Ansprechperson löschen"
hx-get="{{ path('app_admin_system_contact_delete', { 'id': contact.id }) }}"
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': 'Ansprechperson bearbeiten',
'url': path('app_admin_system_contact_edit', { 'id': contact.id })
}) }}>
title="Ansprechperson bearbeiten"
hx-get="{{ path('app_admin_system_contact_edit', { 'id': contact.id }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('edit') }}
</button>
</div>
@@ -71,11 +68,10 @@
</div>
<button type="button"
class="btn"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Ansprechperson hinzufügen',
'url': path('app_admin_system_contact_create')
}) }}>
title="Ansprechperson hinzufügen"
hx-get="{{ path('app_admin_system_contact_create') }}"
hx-target="body"
hx-swap="beforeend">
Neu
</button>
{% endblock %}