mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-05 15:10:16 +02:00
482ca8be7e
Add a 50/50 or 66/33 split layout to every backoffice page with Dutch instructions explaining how to use Tijd voor de Test. Content covers the overall workflow, quiz finalize/activate flow, and both candidate participation methods (own device vs. shared laptop). Help text lives in dedicated partials under templates/backoffice/help/ and is loaded via Twig include(), keeping page templates clean. All strings use a separate 'instructions' translation domain (instructions+intl-icu.nl.xliff) isolated from the main messages domain. Also updates 'Finalize'-related Dutch translations to use 'Afronden' and adds tooltips to the finalize/unfinalize buttons.
59 lines
2.7 KiB
Twig
59 lines
2.7 KiB
Twig
{% extends 'backoffice/base.html.twig' %}
|
|
|
|
{% macro answer_row(answerForm) %}
|
|
<div class="d-flex align-items-center gap-2 mb-2" data-collection-item>
|
|
<div class="flex-grow-1">{{ form_widget(answerForm.text) }}</div>
|
|
<div class="form-check">
|
|
{{ form_widget(answerForm.isRightAnswer, {attr: {class: 'form-check-input'}}) }}
|
|
{{ form_label(answerForm.isRightAnswer, null, {label_attr: {class: 'form-check-label'}}) }}
|
|
</div>
|
|
<button type="button" class="btn btn-sm btn-outline-danger"
|
|
data-action="bo--form-collection#removeItem">×</button>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% block title %}{{ parent() }}{{ 'Question bank'|trans }}{% endblock %}
|
|
|
|
{% block breadcrumbs %}
|
|
<nav aria-label="breadcrumb" class="mb-3">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="{{ path('tvdt_backoffice_index') }}">{{ 'Home'|trans }}</a></li>
|
|
<li class="breadcrumb-item"><a href="{{ path('tvdt_backoffice_season', {seasonCode: season.seasonCode}) }}">{{ season.name }}</a></li>
|
|
<li class="breadcrumb-item"><a href="{{ path('tvdt_backoffice_question_bank', {seasonCode: season.seasonCode}) }}">{{ 'Question bank'|trans }}</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page">{{ bankQuestion is null ? 'Add question'|trans : 'Edit question'|trans }}</li>
|
|
</ol>
|
|
</nav>
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="row">
|
|
<div class="col-md-6 col-12">
|
|
<h2 class="mb-3">{{ bankQuestion is null ? 'Add question'|trans : 'Edit question'|trans }}</h2>
|
|
|
|
{{ form_start(form) }}
|
|
{{ form_row(form.question) }}
|
|
{{ form_row(form.reusable) }}
|
|
{{ form_row(form.labels) }}
|
|
|
|
<div data-controller="bo--form-collection"
|
|
data-bo--form-collection-prototype-value="{{ _self.answer_row(form.answers.vars.prototype)|e('html_attr') }}">
|
|
{{ form_label(form.answers) }}
|
|
{{ form_errors(form.answers) }}
|
|
<div data-bo--form-collection-target="collection">
|
|
{% for answerForm in form.answers %}
|
|
{{ _self.answer_row(answerForm) }}
|
|
{% endfor %}
|
|
</div>
|
|
{% do form.answers.setRendered %}
|
|
<button type="button" class="btn btn-sm btn-outline-primary mb-3"
|
|
data-action="bo--form-collection#addItem">{{ 'Add answer'|trans }}</button>
|
|
</div>
|
|
|
|
{{ form_end(form) }}
|
|
</div>
|
|
<div class="col-md-6 col-12">
|
|
{{ include('backoffice/help/quiz_question_bank_form.html.twig') }}
|
|
</div>
|
|
</div>
|
|
{% endblock body %}
|