Files
TijdVoorDeTest/templates/backoffice/quiz/tab_candidates_list.html.twig
T
Marijn 482ca8be7e feat: add contextual help panels to all backoffice pages
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.
2026-07-04 23:10:12 +02:00

60 lines
2.6 KiB
Twig

<div class="row">
<div class="col-md-8 col-12">
<h4 class="mb-3">{{ 'Candidates'|trans }}</h4>
<table class="table table-hover mb-3">
<thead>
<tr>
<th scope="col">{{ 'Name'|trans }}</th>
<th scope="col">{{ 'Quiz Status'|trans }}</th>
<th scope="col">{{ 'Candidate Status'|trans }}</th>
<th scope="col">{{ 'Actions'|trans }}</th>
</tr>
</thead>
<tbody>
{% for data in candidateData %}
{% set candidate = data.candidate %}
{% set quizCandidate = data.quizCandidate %}
{% set givenAnswersCount = data.givenAnswersCount %}
<tr>
<td>{{ candidate.name }}</td>
<td>
{% if quizCandidate and quizCandidate.started %}
{% if givenAnswersCount >= quiz.questions|length %}
<span class="badge text-bg-success">{{ 'Completed'|trans }}</span>
{% else %}
<span class="badge text-bg-warning">{{ 'In Progress'|trans }} ({{ givenAnswersCount }}/{{ quiz.questions|length }})</span>
{% endif %}
{% else %}
<span class="badge text-bg-secondary">{{ 'Not Started'|trans }}</span>
{% endif %}
</td>
<td>
{% if quizCandidate == null or quizCandidate.active %}
<span class="badge text-bg-success">{{ 'Active'|trans }}</span>
{% else %}
<span class="badge text-bg-secondary">{{ 'Inactive'|trans }}</span>
{% endif %}
</td>
<td>
<form action="{{ path('tvdt_backoffice_toggle_candidate', {quiz: quiz.id, candidate: candidate.id}) }}" method="POST">
<input type="hidden" name="_token" value="{{ csrf_token('toggle_candidate') }}">
<button type="submit" class="btn btn-sm btn-outline-secondary">
{% if quizCandidate == null or quizCandidate.active %}
{{ 'Deactivate'|trans }}
{% else %}
{{ 'Activate'|trans }}
{% endif %}
</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="col-md-4 col-12">
{{ include('backoffice/help/quiz_candidates.html.twig') }}
</div>
</div>