Improve answers display on question pages

This commit is contained in:
Ross
2023-02-27 10:02:03 +00:00
parent b14b1c20bd
commit 732ba1b25b
4 changed files with 225 additions and 194 deletions
+19 -3
View File
@@ -40,9 +40,25 @@
</div>
<h1>{{ question.get_primary_answer }}</h1>
<h2>{{question.question_type}}</h2>
Answers (score): {% for answer in question.answers.all %}
{{ answer }} ({{answer.status}}),
{% endfor %}
<details>
<summary>
Answers:
</summary>
<table>
<tr><th>Answer</th><th>Score</th></tr>
{% for answer in question.answers.all|dictsortreversed:"status" %}
<tr>
<td>
<span {% if answer.proposed %}class="proposed-answer" data-aid="{{answer.pk}}" data-question-type="anatomy"
{% endif %}>
{{ answer }}
</span>
<td>
<td>{{answer.status}}</td>
</tr>
{% endfor %}
</table>
</details>
<div>
Description: {{ question.description }}
</div>