diff --git a/src/Form/QuestionnaireType.php b/src/Form/QuestionnaireType.php index d137c01..3e91b62 100644 --- a/src/Form/QuestionnaireType.php +++ b/src/Form/QuestionnaireType.php @@ -302,7 +302,7 @@ class QuestionnaireType extends AbstractType 'value' => $question->showIf->value, ], JSON_THROW_ON_ERROR), // a follow-up is indented under the question that opened it - 'class' => '-mt-2 border-l-2 border-gray-200 pl-4', + 'class' => '-mt-2 border-l-2 border-line pl-4', ]), ]; diff --git a/templates/administrative/questionnaire/detail.html.twig b/templates/administrative/questionnaire/detail.html.twig index fb01e19..4516cd3 100644 --- a/templates/administrative/questionnaire/detail.html.twig +++ b/templates/administrative/questionnaire/detail.html.twig @@ -4,22 +4,26 @@ {% block content %} {% set context = response.context %} -

+ + {{ icon('arrow-left', 'w-4 h-4 shrink-0') }} + zurück + +

{{ definition.title }}{% if response.leg %}: {{ response.leg.label }}{% endif %}

-

+

{{ response.destination ? context.destinationProduct|default('-') : context.teamerName|default('-') }}, abgeschickt am {{ response.submittedAt|date('d.m.Y, H:i') }} Uhr

-
+
{% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers, 'context': context } %}
-
+
+
{% endblock %} diff --git a/templates/administrative/questionnaire/index.html.twig b/templates/administrative/questionnaire/index.html.twig index 6cd020f..926ac06 100644 --- a/templates/administrative/questionnaire/index.html.twig +++ b/templates/administrative/questionnaire/index.html.twig @@ -4,19 +4,9 @@ {% block content %}
-
-

- Fragebögen: {{ definition.title }} -

-
- {% for other in definitions %} - - {{ other.title }} - - {% endfor %} -
-
+

+ Fragebögen +

+ {# one tab per questionnaire, as the record tabs (_partials/_tabs.html.twig) #} +
@@ -112,7 +111,7 @@ {{ response.submittedAt|date('d.m.Y') }} - + {{ icon('info', 'w-4 h-4') }} @@ -120,7 +119,7 @@ {% else %} - Keine Daten... + Keine Fragebögen gefunden. {% endfor %} diff --git a/templates/administrative/questionnaire/test.html.twig b/templates/administrative/questionnaire/test.html.twig index a7f5f6c..1bfc026 100644 --- a/templates/administrative/questionnaire/test.html.twig +++ b/templates/administrative/questionnaire/test.html.twig @@ -4,6 +4,10 @@ {% block content %}
+ + {{ icon('arrow-left', 'w-4 h-4 shrink-0') }} + zurück +

Vorschau Reiseleitungsfeedback

@@ -23,7 +27,7 @@ {% if busEscort != assignment.hasBusEscort %} Dieser Einsatz hat {{ assignment.hasBusEscort ? 'eine' : 'keine' }} Busbegleitung. {% endif %} - {{ busEscort ? 'Ohne' : 'Mit' }} Bus-Feedback ansehen + {{ busEscort ? 'Ohne' : 'Mit' }} Bus-Feedback ansehen {% endblock %} {% endembed %} @@ -35,7 +39,7 @@
{% for item in submitted %}
-

+

{{ item.definition.title }}{% if item.leg %}: {{ item.leg.label }}{% endif %}

{% include 'questionnaire/_answers.html.twig' with { 'definition': item.definition, 'answers': item.answers } %} @@ -57,10 +61,5 @@ {% include 'questionnaire/_form.html.twig' %} {% endif %} -
{% endblock %} diff --git a/templates/administrative/questionnaire/test_house_manager.html.twig b/templates/administrative/questionnaire/test_house_manager.html.twig index 1424a1d..4b065ee 100644 --- a/templates/administrative/questionnaire/test_house_manager.html.twig +++ b/templates/administrative/questionnaire/test_house_manager.html.twig @@ -4,6 +4,10 @@ {% block content %}
+ + {{ icon('arrow-left', 'w-4 h-4 shrink-0') }} + zurück +

Vorschau Hausleitungsfeedback

@@ -32,16 +36,16 @@ } %} {% endif %} {% include 'questionnaire/_form.html.twig' %} -
-

+
+

Bewerte dein Wochenteam

-

+

Hier verlinkt die Hausleitung jede:n Teamer:in in die Bewertung:

    {% for disposition in dispositions %} -
  • {{ disposition.teamer.fullName }} {{ disposition.assignment.jobProfile.name }}
  • +
  • {{ disposition.teamer.fullName }} {{ disposition.assignment.jobProfile.name }}
  • {% else %}
  • -
  • {% endfor %} @@ -49,10 +53,5 @@
{% endif %} -

{% endblock %} diff --git a/templates/forms.html.twig b/templates/forms.html.twig index bde1409..6624392 100644 --- a/templates/forms.html.twig +++ b/templates/forms.html.twig @@ -178,10 +178,10 @@ # several: its title, its description and its sections. #} {%- block questionnaire_part_row -%} -
-

{{ label }}

+
+

{{ label }}

{%- if help is not empty -%} -

{{ help|nl2br }}

+

{{ help|nl2br }}

{%- endif -%} {%- for child in form -%} {{- form_row(child) -}} @@ -196,7 +196,7 @@ #} {%- block questionnaire_leg_row -%}
-

{{ label }}

+

{{ label }}

{%- for child in form -%} {{- form_row(child) -}} {%- endfor -%} @@ -211,7 +211,7 @@ {%- block questionnaire_section_row -%}
{%- if label is not same as(false) -%} - {{ label }} + {{ label }} {%- endif -%}
{%- for child in form -%} @@ -230,9 +230,9 @@
{%- for child in form -%} {%- endfor -%}
@@ -244,7 +244,7 @@ {%- for child in form -%} @@ -273,7 +273,7 @@ {%- for child in form -%} @@ -292,7 +292,7 @@ {%- block questionnaire_pick_row -%}
{{- block('questionnaire_pick_toggle') -}} -
+
{%- for child in form|filter(child => child.vars.name != 'picked') -%} {{- form_row(child) -}} @@ -331,7 +331,7 @@ {%- with { child: form.hours_per_day } -%}{{- block('questionnaire_pick_number') -}}{%- endwith -%}
-

{{ form.dates.vars.label }}

+

{{ form.dates.vars.label }}

{{- form_widget(form.dates) -}}
@@ -347,9 +347,9 @@ {%- block questionnaire_pick_toggle -%}
{{- form_errors(form) -}}
@@ -359,7 +359,7 @@ {%- block questionnaire_pick_number -%} {%- endblock questionnaire_pick_number -%} @@ -376,7 +376,7 @@ {%- for child in form -%} @@ -391,7 +391,7 @@ {{- form_row(child) -}} {%- endfor -%} {%- if form is empty -%} -

Für diese Reise sind keine Teamer:innen eingeteilt.

+

Für diese Reise sind keine Teamer:innen eingeteilt.

{%- endif -%}
{%- endblock teamer_guidings_widget -%} diff --git a/templates/house_manager/questionnaire/_team.html.twig b/templates/house_manager/questionnaire/_team.html.twig index f5a4906..0937c0b 100644 --- a/templates/house_manager/questionnaire/_team.html.twig +++ b/templates/house_manager/questionnaire/_team.html.twig @@ -3,28 +3,28 @@ # rated. Not part of the questionnaire's answers; a rating is filed against the placement as # always. Expects `dispositions` (DispositionRepository::findForHouseManagerQuestionnaire()). #} -
-

+
+

Bewerte dein Wochenteam

{% if hint|default(false) %} -

+

Speichere deinen Fragebogen vorher als Entwurf, sonst gehen deine Eingaben verloren.

{% endif %} -
    +
      {% for disposition in dispositions %}
    • {{ disposition.teamer.fullName }} - {{ disposition.assignment.jobProfile.name }} + {{ disposition.assignment.jobProfile.name }} {% if disposition.feedback %} - + {{ icon('check', 'w-4 h-4') }} bewertet {% elseif disposition.feedbackWaived %} - nicht nötig + nicht nötig {% else %} @@ -34,7 +34,7 @@ {% endif %}
    • {% else %} -
    • -
    • +
    • -
    • {% endfor %}
diff --git a/templates/house_manager/questionnaire/_travel_summary.html.twig b/templates/house_manager/questionnaire/_travel_summary.html.twig index 433f1bf..2a3e58f 100644 --- a/templates/house_manager/questionnaire/_travel_summary.html.twig +++ b/templates/house_manager/questionnaire/_travel_summary.html.twig @@ -1,8 +1,8 @@ {# # The travel a house manager questionnaire is about, in one line above it. Expects `destination`. #} -

- {{ destination.product }} +

+ {{ destination.product }} {% include '_partials/_dot.html.twig' %} {{ destination.hotel }} {% include '_partials/_dot.html.twig' %} diff --git a/templates/house_manager/questionnaire/detail.html.twig b/templates/house_manager/questionnaire/detail.html.twig index d189502..e9ec0a3 100644 --- a/templates/house_manager/questionnaire/detail.html.twig +++ b/templates/house_manager/questionnaire/detail.html.twig @@ -8,7 +8,7 @@ Fragebogen zur Reise

{% include 'house_manager/questionnaire/_travel_summary.html.twig' %} -

+

Abgeschickt am {{ response.submittedAt|date('d.m.Y, H:i') }} Uhr

{% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers, 'context': response.context } %} diff --git a/templates/house_manager/questionnaire/edit.html.twig b/templates/house_manager/questionnaire/edit.html.twig index bd27d61..dacd361 100644 --- a/templates/house_manager/questionnaire/edit.html.twig +++ b/templates/house_manager/questionnaire/edit.html.twig @@ -9,7 +9,7 @@ {% include 'house_manager/questionnaire/_travel_summary.html.twig' %} {% if lastSaved %} -

+

Entwurf zuletzt gespeichert am {{ lastSaved|date('d.m.Y, H:i') }} Uhr

{% endif %} diff --git a/templates/questionnaire/_answers.html.twig b/templates/questionnaire/_answers.html.twig index ef07020..5000df7 100644 --- a/templates/questionnaire/_answers.html.twig +++ b/templates/questionnaire/_answers.html.twig @@ -6,29 +6,29 @@ # than dropped. #} {% set context = context|default({}) %} -
+
{% for section in definition.sections %} {% set shown = section.questions|filter(question => answers[question.key] is defined and definition.isVisible(question, answers)) %} {% if shown is not empty %} -
+
{% if section.title %} -

+

{{ section.title }}

{% endif %} -
+
{% for question in shown %} {% set answer = answers[question.key] %} -
-
+
+
{{ question.label|nl2br }}
-
+
{% if question.type.value == 'rating' %} {% for grade in range(1, 5) %} - {{ icon('star', html_classes('w-4 h-4', { 'text-gray-200': answer < grade, 'text-primary': answer >= grade })) }} + {{ icon('star', html_classes('w-4 h-4', { 'text-gray-300': answer < grade, 'text-brand': answer >= grade })) }} {% endfor %} {{ answer }} von 5 diff --git a/templates/questionnaire/_assignment_summary.html.twig b/templates/questionnaire/_assignment_summary.html.twig index b8abb38..0b98ae1 100644 --- a/templates/questionnaire/_assignment_summary.html.twig +++ b/templates/questionnaire/_assignment_summary.html.twig @@ -4,8 +4,8 @@ #} {% set destination = assignment.destination %} {% set pickup = assignment.hasBusEscort ? destination.pickup(assignment.pickup) : null %} -

- {{ assignment.jobProfile.name }} +

+ {{ assignment.jobProfile.name }} {% include '_partials/_dot.html.twig' %} {{ destination.product }} {% include '_partials/_dot.html.twig' %} diff --git a/templates/questionnaire/_form.html.twig b/templates/questionnaire/_form.html.twig index 47f87cb..a4b5ae9 100644 --- a/templates/questionnaire/_form.html.twig +++ b/templates/questionnaire/_form.html.twig @@ -6,11 +6,11 @@ {% for child in form|filter(child => child.vars.name not in ['draft', 'submit']) %} {{ form_row(child) }} {% endfor %} -

- {{ form_widget(form.submit, { attr: { class: 'btn' } }) }} +
+ {{ form_widget(form.submit, { attr: { class: 'btn btn--cta' } }) }} {{ form_widget(form.draft, { attr: { class: 'btn btn--secondary' } }) }}
-

+

Als Entwurf kannst du den Fragebogen jederzeit speichern und später weiter ausfüllen. Abgeschickt ist er endgültig.

diff --git a/templates/teamer/questionnaire/detail.html.twig b/templates/teamer/questionnaire/detail.html.twig index 6aaa827..896107e 100644 --- a/templates/teamer/questionnaire/detail.html.twig +++ b/templates/teamer/questionnaire/detail.html.twig @@ -8,23 +8,23 @@ Fragebogen zu deinem Einsatz {% include 'questionnaire/_assignment_summary.html.twig' with { 'assignment': disposition.assignment } %} -

+

Danke für dein Feedback!

-
+
{% for item in submitted %}
-

+

{{ item.definition.title }}{% if item.response.leg %}: {{ item.response.leg.label }}{% endif %}

-

+

Abgeschickt am {{ item.response.submittedAt|date('d.m.Y, H:i') }} Uhr

{% include 'questionnaire/_answers.html.twig' with { 'definition': item.definition, 'answers': item.response.answers } %}
{% endfor %} {% if open %} - + Offenen Fragebogen ausfüllen {% endif %} diff --git a/templates/teamer/questionnaire/edit.html.twig b/templates/teamer/questionnaire/edit.html.twig index 74ee8fa..3d34b16 100644 --- a/templates/teamer/questionnaire/edit.html.twig +++ b/templates/teamer/questionnaire/edit.html.twig @@ -9,7 +9,7 @@ {% include 'questionnaire/_assignment_summary.html.twig' with { 'assignment': disposition.assignment } %} {% if lastSaved %} -

+

Entwurf zuletzt gespeichert am {{ lastSaved|date('d.m.Y, H:i') }} Uhr

{% endif %}