Improve answers display on question pages
This commit is contained in:
@@ -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}}),
|
||||
<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>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<h2>Edit User / {{ciduser.cid}}</h2>
|
||||
Use this form to create a user. Only existing supervisors can be added (create it first or add it later if it does not exist).
|
||||
Use this form to create a user. Only existing supervisors can be added (<a href="{% url 'generic:supervisor_create' %}">create them first</a> and refresh this page or add them later if they do not exist).
|
||||
{% if errors %}
|
||||
<div class="alert alert-info" role="alert">{{errors}}</a></div>
|
||||
{% endif %}
|
||||
|
||||
@@ -556,11 +556,13 @@ class UserListTableView(CidManagerRequiredMixin, SingleTableMixin, FilterView):
|
||||
# context["cid_user_groups"] = cid_user_groups
|
||||
return context
|
||||
|
||||
|
||||
class DeleteUserView(CidManagerRequiredMixin, DeleteView):
|
||||
model = User
|
||||
template_name: str = "confirm_delete.html"
|
||||
success_url = reverse_lazy("accounts_list")
|
||||
|
||||
|
||||
class UpdateUserView(CidManagerRequiredMixin, UpdateView):
|
||||
model = User
|
||||
fields = ["first_name", "last_name", "email"] # Keep listing whatever fields
|
||||
|
||||
@@ -49,12 +49,25 @@
|
||||
{% comment %} <p><b>Scrapped:</b> {{ question.scrapped }} <a
|
||||
href="{% url 'rapids:rapid_scrap' pk=question.pk %}">(toggle)</a></p> {% endcomment %}
|
||||
<p class="pre-whitespace">
|
||||
Answers (score): {% for answer in question.answers.all %}
|
||||
<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="rapid"
|
||||
{% endif %}>
|
||||
{{ answer }} ({{answer.status}}),
|
||||
{{ answer }}
|
||||
</span>
|
||||
<td>
|
||||
<td>{{answer.status}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</details>
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user