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
+9 -10
View File
@@ -81,22 +81,21 @@
{% for feedback in recentFeedback %}
<li class="py-2 first:pt-0 last:pb-0">
<button type="button"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': feedback.destinationName ~ ' ' ~ feedback.assignmentDate|date('m.Y'),
'url': path('app_teamer_feedback', { 'uuid': feedback.uuid })
}) }}>
<div class="flex items-center space-x-1">
title="Feedback {{ feedback.destinationName ~ ' ' ~ feedback.assignmentDate|date('m.Y') }}"
hx-get="{{ path('app_teamer_feedback', { 'uuid': feedback.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
<span class="flex items-center space-x-1">
{{ icon('feedback', 'w-4 h-4 shrink-0') }}
<div class="flex items-center space-x-1 truncate">
<span class="flex items-center space-x-1 truncate">
<span class="whitespace-nowrap">{{ feedback.createdAt|date('d.m.y') }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ feedback.author }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ feedback.averageRating|format_rating }}</span>
</div>
</div>
<div class="pl-5">{{ feedback.comment }}</div>
</span>
</span>
<span class="block pl-5">{{ feedback.comment }}</span>
</button>
</li>
{% else %}