From 10c18bd514dd1b522d38a75edc0d6aedf612066f Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 16 Nov 2025 22:20:53 +0000 Subject: [PATCH] Refactor case management links: move to separate partial for improved template organization and clarity --- atlas/templates/atlas/collection_detail.html | 223 +++++++++++-------- 1 file changed, 125 insertions(+), 98 deletions(-) diff --git a/atlas/templates/atlas/collection_detail.html b/atlas/templates/atlas/collection_detail.html index 9ce7f965..e625fa09 100644 --- a/atlas/templates/atlas/collection_detail.html +++ b/atlas/templates/atlas/collection_detail.html @@ -1,6 +1,34 @@ {% extends 'atlas/exams.html' %} -{# per-case management links removed here; will include via separate partial to keep template logic simple #} +{% load partials %} + +{% partialdef casedetails-management-links %} + + ( + + {% if casedetail.default_viewerstate %} + + {% endif %} + ) + + () + + {% if collection.collection_type == "QUE" %} + ( + {% if casedetail.question_schema %} + + {% else %} + + {% endif %} + + ) + {% endif %} + + {% if casedetail.case.previous_case %} + ( + ) + {% endif %} +{% endpartialdef %} {% block content %}

{{collection.name}}

@@ -8,108 +36,107 @@ {% include 'exam_notes.html' %}
-
-
-
-
-
-
-

{{ collection.name }}

-
Type: {{ collection.get_collection_type_display }} ยท Mode: {{ collection.exam_mode }}
-
-
- {% if collection.collection_type == "VIV" %} - Start Viva - {% else %} - Take / View - - Review collection here - {% endif %} -
-
-
-
-
+ Exam mode: {{collection.exam_mode}} (open access: {{collection.exam_open_access}})
+ {% include "generic/partials/exams/exam_status.html#publish-results" %} + {% include "generic/partials/exams/exam_status.html#exam-active" %} + Collection Type: {{collection.get_collection_type_display}}
+ Self review: {{collection.self_review}}
+ Open access: {{collection.open_access}}
+ {% if collection.prerequisites.exists %} + Prerequisite collections: +
    + {% for prereq in collection.prerequisites.all %} +
  • + {{ prereq.name }} +   +
  • + {% endfor %} +
-
-
- {% include 'exam_notes.html' %} +

+ +

+ {% endif %} +
-
-
Cases
-
-
    - {% for casedetail in casesdetails %} -
  1. -
    -
    - Case {{ forloop.counter }}: - {% if casedetail.case.series.count == 0 %} - - {% endif %} - {{ casedetail.case.title }} -
    -
    {% include 'atlas/partials/casedetails_management_links.html' %}
    -
    -
  2. - {% empty %} -
  3. No cases in this collection.
  4. - {% endfor %} -
-
-
- {% include 'exam_overview_js.html' %} - + {% if collection.collection_type == "VIV" %} +

+ {% else %} +

This collection will be available to view/take here{% if not collection.active %} (when active){% endif %} +

Review collection here + {% endif %} -

-
+

Cases

+
    + {% for casedetail in casesdetails %} +
  1. + + + Case {{forloop.counter}} + : + {% if casedetail.case.series.count == 0 %} +    + {% endif %} + {{casedetail.case.title}} + + {% partial casedetails-management-links %} + +
  2. + + {% endfor %} +
+ + + + + {% if can_edit %} +

+

+

+

+ +
+ Answer management + +
+

Manage answers for this collection.

+ + Please note these are permanant and cannot be undone.
- {% endblock %} + + + + +
+ +
+ {% endif %} + {% include 'exam_overview_js.html' %} +{% endblock %}