mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-06 23:50:16 +02:00
feat: quiz page question rework (#181)
- Replace Bootstrap accordion with flat card list for questions - Add HTML5 drag-and-drop reordering with placeholder-between-cards UX and amber/green/red save status indicator next to the heading - Add edit button per question opening a Bootstrap modal (bo--modal-form Stimulus controller with X-Modal-Request header pattern) - Show read-only view button instead of edit for locked/finalized quizzes - Add BankQuestion edit modal in question bank tab using same infrastructure - Move modal action buttons into modal-footer via <template data-modal-footer> - Fix IS_AUTHENTICATED_FULLY 403: replace ROLE_USER with IS_AUTHENTICATED on all backoffice controllers and in security.yaml access_control
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<p class="fw-semibold mb-3">{{ question.question }}</p>
|
||||
|
||||
<ul class="list-group">
|
||||
{% for answer in question.answers %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<span{% if answer.isRightAnswer %} class="fw-semibold"{% endif %}>
|
||||
{% if answer.isRightAnswer %}<i class="bi bi-check-circle-fill text-success me-1"></i>{% endif %}
|
||||
{{ answer.text }}
|
||||
</span>
|
||||
{% if answer.candidates|length > 0 %}
|
||||
<span class="text-muted small">{{ answer.candidates|map(c => c.name)|join(', ') }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="list-group-item text-muted">{{ 'There are no answers for this question'|trans }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<template data-modal-footer>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ 'Close'|trans }}</button>
|
||||
</template>
|
||||
Reference in New Issue
Block a user