mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-05 15:10:16 +02:00
d8b671046b
- season.html.twig: remove dead empty column, drop redundant flex-row - tab_overview.html.twig: extract Twig macro for confirm modals, fix duplicate aria-labelledby IDs - tab_result.html.twig: remove dead comment, replace inline widths with CSS classes, simplify nested row/col forms to d-flex gap-1 - backoffice.scss: add col-result-xs/sm/md column width classes - quiz.scss: replace broken display:grid + justify-self:center with flexbox centering
72 lines
3.6 KiB
Twig
72 lines
3.6 KiB
Twig
<h4 class="mb-3">{{ 'Score'|trans }}</h4>
|
|
<div class="btn-toolbar mb-3" role="toolbar">
|
|
<div class="btn-group me-2">
|
|
<form action="{{ path('tvdt_prepare_elimination', {seasonCode: season.seasonCode, quiz: quiz.id}) }}" method="POST">
|
|
<input type="hidden" name="_token" value="{{ csrf_token('prepare_elimination') }}">
|
|
<button type="submit" class="btn btn-secondary rounded-0 rounded-start">{{ 'Prepare Custom Elimination'|trans }}</button>
|
|
</form>
|
|
{%~ if not quiz.eliminations.empty %}
|
|
<button class="btn btn-secondary dropdown-toggle"
|
|
data-bs-toggle="dropdown">{{ 'Load Prepared Elimination'|trans }}</button>
|
|
<ul class="dropdown-menu">
|
|
{%~ for elimination in quiz.eliminations %}
|
|
<li><a class="dropdown-item"
|
|
href="{{ path('tvdt_prepare_elimination_view', {elimination: elimination.id}) }}">{{ elimination.createdAt|format_datetime() }}</a>
|
|
</li>
|
|
{%~ endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<p class="mb-3">{{ 'Number of dropouts:'|trans }} {{ quiz.dropouts }} </p>
|
|
<table class="table table-hover table-result mb-3">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">{{ 'Candidate'|trans }}</th>
|
|
<th class="col-result-sm" scope="col">{{ 'Correct Answers'|trans }}</th>
|
|
<th class="col-result-md" scope="col">{{ 'Corrections'|trans }}</th>
|
|
<th class="col-result-md" scope="col">{{ 'Penalty'|trans }}</th>
|
|
<th class="col-result-xs" scope="col">{{ 'Score'|trans }}</th>
|
|
<th class="col-result-md" scope="col">{{ 'Time'|trans }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{%~ for candidate in result ~%}
|
|
<tr class="table-{% if loop.revindex > quiz.dropouts %}success{% else %}danger{% endif %}">
|
|
<td>{{ candidate.name }}</td>
|
|
<td>{{ candidate.correct|default('0') }}</td>
|
|
<td>
|
|
<form method="post"
|
|
action="{{ path('tvdt_backoffice_modify_correction', {quiz: quiz.id, candidate: candidate.id}) }}">
|
|
<input type="hidden" name="_token" value="{{ csrf_token('candidate_correction') }}">
|
|
<div class="d-flex gap-1">
|
|
<input class="form-control form-control-sm" type="number"
|
|
value="{{ candidate.corrections }}" step="0.5"
|
|
name="corrections">
|
|
<button class="btn btn-sm btn-primary" type="submit">{{ 'Save'|trans }}</button>
|
|
</div>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<form method="post"
|
|
action="{{ path('tvdt_backoffice_modify_penalty', {quiz: quiz.id, candidate: candidate.id}) }}">
|
|
<input type="hidden" name="_token" value="{{ csrf_token('candidate_penalty') }}">
|
|
<div class="d-flex gap-1">
|
|
<input class="form-control form-control-sm" type="number"
|
|
value="{{ candidate.penaltySeconds }}" step="1"
|
|
name="penalty">
|
|
<button class="btn btn-sm btn-primary" type="submit">{{ 'Save'|trans }}</button>
|
|
</div>
|
|
</form>
|
|
</td>
|
|
<td>{{ candidate.score|default('x') }}</td>
|
|
<td>{{ candidate.time.format('%i:%S') }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="6">{{ 'No results'|trans }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|