mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-05 20:44:19 +01:00
This commit removes nullable Uuid properties for consistency, transitions the Correction entity to QuizCandidate with associated migrations, refactors queries and repositories, adjusts related routes and controllers to use the new entity, updates front-end assets for elimination workflows, and standardizes route requirements and naming conventions.
54 lines
1.9 KiB
Twig
54 lines
1.9 KiB
Twig
{% extends 'backoffice/base.html.twig' %}
|
|
|
|
{% block title %}Hello BackofficeController!{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="d-flex flex-row align-items-center">
|
|
<h2 class="py-2 pe-2">
|
|
{{ is_granted('ROLE_ADMIN') ? 'All Seasons'|trans : 'Your Seasons'|trans }}
|
|
</h2>
|
|
<a class="link" href="{{ path('app_backoffice_season_add') }}">
|
|
{{ 'Add'|trans }}
|
|
</a>
|
|
</div>
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
{% if is_granted('ROLE_ADMIN') %}
|
|
<th scope="col">{{ 'Owner(s)'|trans }}</th>
|
|
{% endif %}
|
|
<th scope="col">{{ 'Name'|trans }}</th>
|
|
<th scope="col">{{ 'Active Quiz'|trans }}</th>
|
|
<th scope="col">{{ 'Season Code'|trans }}</th>
|
|
<th scope="col">{{ 'Manage'|trans }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for season in seasons %}
|
|
<tr class="align-middle">
|
|
{% if is_granted('ROLE_ADMIN') %}
|
|
<td>{{ season.owners|map(o => o.email)|join(', ') }}</td>
|
|
{% endif %}
|
|
<td>{{ season.name }}</td>
|
|
<td>
|
|
{% if season.activeQuiz %}
|
|
{{ season.activeQuiz.name }}
|
|
{% else %}
|
|
{{ 'No active quiz'|trans }}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<a {% if season.activeQuiz %}href="{{ path('app_quiz_enter_name', {seasonCode: season.seasonCode}) }}"
|
|
{% else %}class="disabled" {% endif %}>{{ season.seasonCode }}</a>
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_backoffice_season', {seasonCode: season.seasonCode}) }}">{{ 'Manage'|trans }}</a>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
EMPTY
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock %}
|