feat: integrate with htmx
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if assignment.pickup %}
|
||||
{% if assignment.pickup and assignment.destination.pickup(assignment.pickup) %}
|
||||
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<span class="whitespace-nowrap">ab {{ pickup.city }}</span>
|
||||
@@ -77,11 +77,9 @@
|
||||
role="button"
|
||||
title="Bewerber:innen-Info anzeigen"
|
||||
aria-label="Bewerber:innen-Info anzeigen"
|
||||
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'ajax', 'click', {
|
||||
'title': 'Teamer:innen-Info ' ~ application.teamer,
|
||||
'url': path('app_admin_teamer_info', { 'uuid': application.teamer.uuid })
|
||||
}) }}>
|
||||
hx-get="{{ path('app_admin_teamer_info', { 'uuid': application.teamer.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{% set requirementsMet = true %}
|
||||
{% if assignment.pickup and not application.matchesPickup %}
|
||||
{{ icon('bus', 'w-5 h-5 text-red-500 shrink-0') }}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
<div class="flex items-start">
|
||||
<div class="flex-1 pr-8">
|
||||
{% include '_partials/_assignment_requirements_info.html.twig' with {
|
||||
'assignment': application.assignment,
|
||||
'teamer': application.teamer
|
||||
} %}
|
||||
<ul class="pb-8 divide-y divide-gray-200">
|
||||
{% for type in ['ski', 'snowboard'] %}
|
||||
<li class="py-2">
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="flex-1">{{ type|license_label }}</span>
|
||||
{% set license = application.teamer.licenseOfType(type) %}
|
||||
{% if license %}
|
||||
<div class="flex items-center space-x-2">
|
||||
<span>{{ license.date|date('m/Y') }}</span>
|
||||
{% if is_granted('DOWNLOAD', license.certificate) %}
|
||||
<a href="{{ path('app_common_download', { 'uuid': license.certificate.uuid, 'inline': true }) }}"
|
||||
target="_blank"
|
||||
title="Download Nachweis">
|
||||
{{ icon('download', 'w-4 h-4') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
{{ icon('minus', 'w-4 h-4') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
{% set teamer = application.teamer %}
|
||||
{% if teamer.photo %}
|
||||
<img src="{{ asset(teamer.photo.filename | imagine_filter('profile')) }}"
|
||||
class="w-32 h-auto border-2 border-primary"
|
||||
alt="{{ teamer.firstName }}">
|
||||
{% else %}
|
||||
<div class="border-2 border-primary">
|
||||
{{ icon('user', 'w-32 h-32 text-gray-200') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_confirmation_modal.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
Möchtest du die Bewerbung von {{ application.teamer }} wirklich löschen?
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_confirmation_modal.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
Möchtest du {{ application.teamer }} wirklich einteilen?
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,50 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Teamer:inneninfo {{ application.teamer }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="flex items-start">
|
||||
<div class="flex-1 pr-8">
|
||||
{% include '_partials/_assignment_requirements_info.html.twig' with {
|
||||
'assignment': application.assignment,
|
||||
'teamer': application.teamer
|
||||
} %}
|
||||
<ul class="pb-8 divide-y divide-gray-200">
|
||||
{% for type in ['ski', 'snowboard'] %}
|
||||
<li class="py-2">
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="flex-1">{{ type|license_label }}</span>
|
||||
{% set license = application.teamer.licenseOfType(type) %}
|
||||
{% if license %}
|
||||
<div class="flex items-center space-x-2">
|
||||
<span>{{ license.date|date('m/Y') }}</span>
|
||||
{% if is_granted('DOWNLOAD', license.certificate) %}
|
||||
<a href="{{ path('app_common_download', { 'uuid': license.certificate.uuid, 'inline': true }) }}"
|
||||
target="_blank"
|
||||
title="Download Nachweis">
|
||||
{{ icon('download', 'w-4 h-4') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
{{ icon('minus', 'w-4 h-4') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
{% set teamer = application.teamer %}
|
||||
{% if teamer.photo %}
|
||||
<img src="{{ asset(teamer.photo.filename | imagine_filter('profile')) }}"
|
||||
class="w-32 h-auto border-2 border-primary"
|
||||
alt="{{ teamer.firstName }}">
|
||||
{% else %}
|
||||
<div class="border-2 border-primary">
|
||||
{{ icon('user', 'w-32 h-32 text-gray-200') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,17 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Bewerbungsstatus bearbeiten{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ form_start(form, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' } }) }}
|
||||
<div class="flex flex-col space-y-4 pb-4">
|
||||
{{ form_row(form.status) }}
|
||||
{{ form_row(form.comment) }}
|
||||
{{ form_row(form.commentVisible) }}
|
||||
</div>
|
||||
<button type="submit" class="btn">
|
||||
Aktualisieren
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
@@ -1,11 +0,0 @@
|
||||
{{ form_start(form) }}
|
||||
<div class="flex flex-col space-y-4 pb-4">
|
||||
{{ form_row(form.status) }}
|
||||
{{ form_row(form.comment) }}
|
||||
{{ form_row(form.commentVisible) }}
|
||||
</div>
|
||||
<button type="submit" class="btn">
|
||||
Aktualisieren
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
Reference in New Issue
Block a user