diff --git a/generic/templates/generic/partials/question_review_block.html b/generic/templates/generic/partials/question_review_block.html index 7f713267..ed8f262d 100644 --- a/generic/templates/generic/partials/question_review_block.html +++ b/generic/templates/generic/partials/question_review_block.html @@ -9,7 +9,7 @@
- +
\ No newline at end of file diff --git a/generic/templates/generic/partials/question_review_form.html b/generic/templates/generic/partials/question_review_form.html index a60db9fe..efbf24f3 100644 --- a/generic/templates/generic/partials/question_review_form.html +++ b/generic/templates/generic/partials/question_review_form.html @@ -1,7 +1,7 @@
{% csrf_token %}
@@ -15,6 +15,6 @@
- +
\ No newline at end of file diff --git a/sbas/models.py b/sbas/models.py index 4659990e..fd2ec390 100644 --- a/sbas/models.py +++ b/sbas/models.py @@ -26,6 +26,7 @@ class Category(models.Model): return self.category +@reversion.register class Question(QuestionBase): title = models.CharField(max_length=200, help_text="Short title for question", blank=True, null=True) stem = models.TextField( diff --git a/sbas/templates/sbas/question_detail.html b/sbas/templates/sbas/question_detail.html index 69470105..6e8eac77 100644 --- a/sbas/templates/sbas/question_detail.html +++ b/sbas/templates/sbas/question_detail.html @@ -1,29 +1,38 @@ {% extends 'sbas/base.html' %} -{% block content %} -
-
-
- {# Placeholder while HTMX fetches review/form #} -
-
-
-

{{ question.title|default:"(No title set)" }}

-
Created: {{ question.created_date|date:"d/m/Y" }}
-
+{% load partials %} + +{% partialdef links-partial %} +
Edit Clone Delete Admin - +
+{% endpartialdef %} + +{% block content %} +
+
+
+
+

{{ question.title|default:"(No title set)" }}

+
Created: {{ question.created_date|date:"d/m/Y" }}
+
+ {% partial links-partial %}
+
Review status: +
+ {# Placeholder while HTMX fetches review/form #} +
+
{% autoescape off %}
{{ question.stem }}
    diff --git a/sbas/templates/sbas/question_form.html b/sbas/templates/sbas/question_form.html index 2a954b83..85f13ee3 100644 --- a/sbas/templates/sbas/question_form.html +++ b/sbas/templates/sbas/question_form.html @@ -1,23 +1,30 @@ {% extends "sbas/base.html" %} {% load static %} +{% load partials %} {% block js %} - + -{{ form.media }} + {{ form.media }} {% endblock %} {% block content %} -

    Submit Question

    -
    - {% csrf_token %} +
    +
    +

    Submit Question

    +
    + {% include "sbas/question_detail.html#links-partial" %} +
    - - {{ form.as_table }} -
    - -
    +
    + {% csrf_token %} + + + {{ form.as_table }} +
    + +
    {% endblock %} \ No newline at end of file