From 1eeb0d89d93597491276c99db750c9735df8ccbe Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 8 Feb 2026 21:42:17 +0000 Subject: [PATCH] Add get_history method to CaseDetail model and update case_list_item template for history modal --- atlas/models.py | 7 +++++++ .../templates/atlas/partials/case_list_item.html | 16 +++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/atlas/models.py b/atlas/models.py index 3676456f..e178db6f 100644 --- a/atlas/models.py +++ b/atlas/models.py @@ -1627,6 +1627,13 @@ class CaseDetail(models.Model): return self.case.history or "No history provided" return "" + def get_history(self): + if self.redact_history: + return "[Redacted]" + if self.override_history and self.override_history != "": + return self.override_history + return self.case.history or "No history provided" + def get_case_series_nested(self, include_priors=True): case_series_images = self.case.get_series_images_nested(as_json=False) diff --git a/atlas/templates/atlas/partials/case_list_item.html b/atlas/templates/atlas/partials/case_list_item.html index 32aaae21..f8d1a87b 100644 --- a/atlas/templates/atlas/partials/case_list_item.html +++ b/atlas/templates/atlas/partials/case_list_item.html @@ -74,7 +74,21 @@ {# Pre-render hidden modal content for this case to avoid HTMX calls #}
- {% include 'atlas/partials/case_field_modal.html' with field='history' content=casedetail.get_history_pre %} + + +
{% include 'atlas/partials/case_field_modal.html' with field='discussion' content=casedetail.case.discussion %}