refactor: split the questionnaire into teamer and bus feedback
This commit is contained in:
1 parent
2f4f9800dd
commit
a0170f5952
35 files changed
+1114
-554
No files matched your search
@@ -35,6 +35,20 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% if siblings is not empty %}
|
||||
<h2 class="text-lg font-bold pt-8 pb-2">
|
||||
Zum selben Einsatz
|
||||
</h2>
|
||||
<ul>
|
||||
{% for sibling in siblings %}
|
||||
<li>
|
||||
<a href="{{ path('app_administrative_questionnaire_detail', { 'uuid': sibling.response.uuid, 'r': app.request.query.get('r') }) }}" class="underline">
|
||||
{{ sibling.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<div class="pt-8">
|
||||
<a href="{{ returnUrl }}" class="underline">
|
||||
zurück
|
||||
|
||||
@@ -1,12 +1,22 @@
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Fragebögen{% endblock %}
|
||||
{% block title %}Fragebögen: {{ definition.title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="flex items-start justify-between pb-4">
|
||||
<h1 class="text-2xl font-bold">
|
||||
Fragebögen: {{ definition.title }}
|
||||
</h1>
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold pb-2">
|
||||
Fragebögen: {{ definition.title }}
|
||||
</h1>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
{% for other in definitions %}
|
||||
<a href="{{ path('app_administrative_questionnaire_index', { 'questionnaire': other.key }) }}"
|
||||
class="{{ html_classes('btn btn--small', { 'btn--secondary': other.key != definition.key }) }}">
|
||||
{{ other.title }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col items-end space-y-2 md:flex-row md:items-center md:space-x-2 md:space-y-0">
|
||||
<button type="button"
|
||||
class="{{ html_classes('btn btn--small', { 'btn--secondary': filterDto.active }) }}"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}{{ definition.title }} (Testmodus){% endblock %}
|
||||
{% block title %}Fragebogen testen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl font-bold pb-4">
|
||||
{{ definition.title }}
|
||||
Fragebogen testen
|
||||
</h1>
|
||||
{% include '_partials/_alert.html.twig' with {
|
||||
'type': 'warning',
|
||||
@@ -14,14 +14,14 @@
|
||||
{% embed '_partials/_alert.html.twig' with { 'type': 'info' } %}
|
||||
{% block message %}
|
||||
{% if busEscort %}
|
||||
Mit den Fragen zur Busfahrt, wie bei einer Busbegleitung.
|
||||
Mit dem Bus-Feedback, wie bei einer Busbegleitung.
|
||||
{% else %}
|
||||
Ohne die Fragen zur Busfahrt, wie bei einem Einsatz ohne Busbegleitung.
|
||||
Ohne das Bus-Feedback, wie bei einem Einsatz ohne Busbegleitung.
|
||||
{% endif %}
|
||||
{% if busEscort != assignment.hasBusEscort %}
|
||||
Dieser Einsatz hat {{ assignment.hasBusEscort ? 'eine' : 'keine' }} Busbegleitung.
|
||||
{% endif %}
|
||||
<a href="{{ otherVariant }}" class="underline">{{ busEscort ? 'Ohne' : 'Mit' }} Busfahrt testen</a>
|
||||
<a href="{{ otherVariant }}" class="underline">{{ busEscort ? 'Ohne' : 'Mit' }} Bus-Feedback testen</a>
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
<div class="grid lg:grid-cols-3 gap-8 items-start">
|
||||
@@ -31,18 +31,22 @@
|
||||
'type': 'success',
|
||||
'message': 'So würde der abgeschickte Fragebogen gespeichert. Ausgeblendete Fragen fallen dabei weg.'
|
||||
} %}
|
||||
{% include 'questionnaire/_answers.html.twig' with { 'answers': submitted } %}
|
||||
<div class="flex flex-col gap-y-12">
|
||||
{% for item in submitted %}
|
||||
<section>
|
||||
<h2 class="text-2xl font-bold pb-4">
|
||||
{{ item.definition.title }}
|
||||
</h2>
|
||||
{% include 'questionnaire/_answers.html.twig' with { 'definition': item.definition, 'answers': item.answers } %}
|
||||
</section>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="pt-8">
|
||||
<a href="{{ path('app_administrative_questionnaire_test', { 'uuid': assignment.uuid, 'r': app.request.query.get('r') }) }}" class="btn btn--secondary">
|
||||
Erneut testen
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if definition.description %}
|
||||
<p class="pb-8 text-gray-700">
|
||||
{{ definition.description|nl2br }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if draft %}
|
||||
{% include '_partials/_alert.html.twig' with {
|
||||
'type': 'success',
|
||||
|
||||
Reference in new issue
Block a user