diff --git a/generic/templates/generic/partials/question_reviews_list.html b/generic/templates/generic/partials/question_reviews_list.html
new file mode 100644
index 00000000..87e39b22
--- /dev/null
+++ b/generic/templates/generic/partials/question_reviews_list.html
@@ -0,0 +1,27 @@
+
+
+
Review history
+
+
+
+
+
+ {% if reviews %}
+
+ {% for r in reviews %}
+ -
+
+
{{ r.get_status_display }}
+
+
{{ r.comment|linebreaksbr }}
+
by {{ r.get_author_str }} on {{ r.created_on }}
+
+
+
+ {% endfor %}
+
+ {% else %}
+
No reviews yet
+ {% endif %}
+
+
\ No newline at end of file
diff --git a/generic/urls.py b/generic/urls.py
index 0b652dd9..29076898 100755
--- a/generic/urls.py
+++ b/generic/urls.py
@@ -281,6 +281,11 @@ def generic_view_urls(generic_views: GenericViewBase):
generic_views.question_set_review,
name="question_set_review",
),
+ path(
+ "question//reviews",
+ generic_views.question_reviews_list,
+ name="question_reviews",
+ ),
path("question//thumbnail/fail", generic_views.question_thumbnail_fail, name="series_thumbnail_fail"),
path("question//thumbnail", generic_views.question_thumbnail, name="series_thumbnail"),
path(
diff --git a/generic/views.py b/generic/views.py
index 6d41bc02..07978ddf 100644
--- a/generic/views.py
+++ b/generic/views.py
@@ -2998,6 +2998,21 @@ class GenericViewBase:
else:
return render(request, "generic/partials/question_review_form.html", {"question": question, "latest": latest, "app_name": self.app_name})
+ def question_reviews_list(self, request, pk):
+ """Return a partial listing all QuestionReview instances for a question."""
+ from django.contrib.contenttypes.models import ContentType
+ from generic.models import QuestionReview
+
+ question = get_object_or_404(self.question_object, pk=pk)
+
+ ct = ContentType.objects.get_for_model(question)
+ reviews = (
+ QuestionReview.objects.filter(content_type=ct, object_id=question.pk)
+ .order_by("-created_on")
+ )
+
+ return render(request, "generic/partials/question_reviews_list.html", {"question": question, "reviews": reviews, "app_name": self.app_name})
+
@method_decorator(user_passes_test(lambda u: u.is_superuser))
def user_answer_delete_multiple(self, request):
print(request.POST["answer_ids"])
diff --git a/sbas/templates/sbas/question_detail.html b/sbas/templates/sbas/question_detail.html
index 6e8eac77..1da91410 100644
--- a/sbas/templates/sbas/question_detail.html
+++ b/sbas/templates/sbas/question_detail.html
@@ -4,14 +4,15 @@
{% partialdef links-partial %}
-
+
{% endpartialdef %}
{% block content %}
@@ -22,16 +23,15 @@
{{ question.title|default:"(No title set)" }}
Created: {{ question.created_date|date:"d/m/Y" }}
- {% partial links-partial %}
+ {% partial links-partial %}
-
Review status:
-
+
Review status:
+
{# Placeholder while HTMX fetches review/form #}
-
{% autoescape off %}
{{ question.stem }}
@@ -175,4 +175,23 @@
-{% endblock %}
\ No newline at end of file
+{% endblock %}
+
+
+
\ No newline at end of file