From ad4be1e9a677182a6d5131b344589eae9ad90869 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 21 Jul 2025 12:52:45 +0100 Subject: [PATCH] improve collection overview page --- atlas/templates/atlas/collection_detail.html | 8 +-- atlas/urls.py | 10 ++++ generic/templates/generic/cid_view.html | 10 ++++ .../generic/partials/exams/exam_status.html | 30 +++++++++++ generic/views.py | 52 +++++++++++++++++++ rad/static/css/anatomy.css | 8 +++ 6 files changed, 115 insertions(+), 3 deletions(-) create mode 100644 generic/templates/generic/partials/exams/exam_status.html diff --git a/atlas/templates/atlas/collection_detail.html b/atlas/templates/atlas/collection_detail.html index 7045dd81..861c7e8a 100644 --- a/atlas/templates/atlas/collection_detail.html +++ b/atlas/templates/atlas/collection_detail.html @@ -1,14 +1,16 @@ {% extends 'atlas/exams.html' %} +{% load partials %} + {% block content %}

{{collection.name}}

{% include 'exam_notes.html' %}
- Exam mode: {{collection.exam_mode}} (Exam open acess: {{collection.exam_open_access}})
- Publish results: {{collection.publish_results}}
- Active: {{collection.active}}
+ 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}}
diff --git a/atlas/urls.py b/atlas/urls.py index ae7cfd70..c4a54d5e 100755 --- a/atlas/urls.py +++ b/atlas/urls.py @@ -81,6 +81,16 @@ urlpatterns = [ name="collection_take_start", ), path("collection//authors", views.CaseCollectionAuthorUpdate.as_view(), name="collection_authors"), + path( + "collection//toggle_results_published", + views.GenericExamViews.exam_toggle_results_published_htmx, + name="exam_toggle_results_published", + ), + path( + "collection//toggle_active", + views.GenericExamViews.exam_toggle_active_htmx, + name="exam_toggle_active", + ), path( "collection//cids", views.GenericExamViews.exam_cids, diff --git a/generic/templates/generic/cid_view.html b/generic/templates/generic/cid_view.html index cf9419d1..de0ca2de 100644 --- a/generic/templates/generic/cid_view.html +++ b/generic/templates/generic/cid_view.html @@ -104,6 +104,15 @@ + + Shorts Exams
+ +
CaseCollection Exams