Display and filter authors on index pages

This commit is contained in:
Ross
2023-02-20 14:10:51 +00:00
parent fc40aacd22
commit b14b1c20bd
3 changed files with 35 additions and 20 deletions
+22 -1
View File
@@ -13,7 +13,15 @@
<h4 class="exam-number-title">{{filter.qs|length}} exams found.</h4>
{% for exam in filter.qs %}
<div class="">
<h1><a href="{% url app_name|add:':exam_overview' pk=exam.pk %}">Exam: {{ exam.name }} </a></h1>
<h1><a href="{% url app_name|add:':exam_overview' pk=exam.pk %}">
{% if exam.exam_mode %}
Exam:
{% else %}
Packet:
{% endif %}
{{ exam.name }} </a></h1>
<span class="authors">Authors: {{exam.get_authors}}</span>
{% if exam.exam_mode %}
{% if app_name in "rapids longs anatomy" %}
{% if request.user.is_staff %}<a href="{% url app_name|add:':mark_overview' pk=exam.pk %}">Mark answers</a>{% endif %}
@@ -23,3 +31,16 @@
</div>
{% endfor %}
{% endblock %}
{% block css %}
<style>
.authors {
float: right;
opacity: 50%;}
</style>
{% endblock css %}