From a6a7d75144049e053e83b4e038aedac843bac355 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 2 Feb 2026 22:29:52 +0000 Subject: [PATCH] Implement modal for case fields and add partial endpoint for dynamic content retrieval --- atlas/templates/atlas/collection_detail.html | 6 +++ .../atlas/partials/case_field_modal.html | 14 +++++++ .../atlas/partials/case_list_item.html | 38 +++++++++++++++---- .../casedetails_management_links.html | 1 - atlas/urls.py | 7 ++++ atlas/views.py | 29 ++++++++++++++ 6 files changed, 87 insertions(+), 8 deletions(-) create mode 100644 atlas/templates/atlas/partials/case_field_modal.html diff --git a/atlas/templates/atlas/collection_detail.html b/atlas/templates/atlas/collection_detail.html index d33f9830..84ff763b 100644 --- a/atlas/templates/atlas/collection_detail.html +++ b/atlas/templates/atlas/collection_detail.html @@ -150,6 +150,12 @@ {% endif %} {% include 'exam_overview_js.html' %} + + {% endblock %} diff --git a/atlas/templates/atlas/partials/case_field_modal.html b/atlas/templates/atlas/partials/case_field_modal.html new file mode 100644 index 00000000..be384499 --- /dev/null +++ b/atlas/templates/atlas/partials/case_field_modal.html @@ -0,0 +1,14 @@ + + + diff --git a/atlas/templates/atlas/partials/case_list_item.html b/atlas/templates/atlas/partials/case_list_item.html index 20132939..8dec3153 100644 --- a/atlas/templates/atlas/partials/case_list_item.html +++ b/atlas/templates/atlas/partials/case_list_item.html @@ -23,20 +23,44 @@ {% endif %} - {# Quick-view icons: open case page (contains history, discussion, report) #} - - + +
+ {# History button: opens modal with history content #} + + {% if casedetail.case.history %} + + {% else %} + + {% endif %} - - + {# Discussion button #} + + {% if casedetail.case.discussion %} + + {% else %} + + {% endif %} - - + {# Report button #} + + {% if casedetail.case.report %} + + {% else %} + + {% endif %}
+ +
{% include 'atlas/partials/casedetails_management_links.html' %}
diff --git a/atlas/templates/atlas/partials/casedetails_management_links.html b/atlas/templates/atlas/partials/casedetails_management_links.html index 2c710e2a..8cce6586 100644 --- a/atlas/templates/atlas/partials/casedetails_management_links.html +++ b/atlas/templates/atlas/partials/casedetails_management_links.html @@ -23,7 +23,6 @@ {% endif %} -
{% if casedetail.default_viewerstate %}