mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-10 01:20:14 +02:00
feat: show active/ready badges on quiz list (#193)
* feat: show active/ready badges on quiz list Adds an "Active" badge for the season's currently selected quiz and renames the "Finalized" badge to "Ready" for finalized quizzes, so both states are visible at a glance. * fix: hide Ready badge on the active quiz, translate to Voorbereid An active quiz is finalized by definition, so showing both badges was redundant. * fix: align quiz status badges to the left of the row Previously the badge trailed the quiz name, so its position shifted with the name's length. Placing it first keeps it at a consistent left edge across all rows. * fix: right-align quiz status badges Puts the badge at the end of the row via ms-auto instead of leading the quiz name.
This commit is contained in:
@@ -8,11 +8,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="list-group mb-3">
|
<div class="list-group mb-3">
|
||||||
{% for quiz in season.quizzes %}
|
{% for quiz in season.quizzes %}
|
||||||
<a class="list-group-item list-group-item-action{% if season.activeQuiz == quiz %} active{% endif %}"
|
<a class="list-group-item list-group-item-action d-flex align-items-center gap-2{% if season.activeQuiz == quiz %} active{% endif %}"
|
||||||
href="{{ path('tvdt_backoffice_quiz', {seasonCode: season.seasonCode, quiz: quiz.id}) }}">
|
href="{{ path('tvdt_backoffice_quiz', {seasonCode: season.seasonCode, quiz: quiz.id}) }}">
|
||||||
{{ quiz.name }}
|
{{ quiz.name }}
|
||||||
{% if quiz.isFinalized %}
|
{% if season.activeQuiz == quiz %}
|
||||||
<span class="badge text-bg-success">{{ 'Finalized'|trans }}</span>
|
<span class="badge text-bg-light ms-auto">{{ 'Active'|trans }}</span>
|
||||||
|
{% elseif quiz.isFinalized %}
|
||||||
|
<span class="badge text-bg-success ms-auto">{{ 'Ready'|trans }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
@@ -665,6 +665,10 @@
|
|||||||
<source>Re-opens the quiz for editing. Candidates will no longer be able to take the quiz until it is finalized again.</source>
|
<source>Re-opens the quiz for editing. Candidates will no longer be able to take the quiz until it is finalized again.</source>
|
||||||
<target>Heropent de test voor bewerking. Deelnemers kunnen de test niet meer afnemen totdat deze opnieuw is afgerond.</target>
|
<target>Heropent de test voor bewerking. Deelnemers kunnen de test niet meer afnemen totdat deze opnieuw is afgerond.</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="MuwD4xO" resname="Ready">
|
||||||
|
<source>Ready</source>
|
||||||
|
<target>Voorbereid</target>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="P1HcfAu" resname="Red">
|
<trans-unit id="P1HcfAu" resname="Red">
|
||||||
<source>Red</source>
|
<source>Red</source>
|
||||||
<target>Rood</target>
|
<target>Rood</target>
|
||||||
|
|||||||
Reference in New Issue
Block a user