From 0d1318564c73c2999c7382d001adbfaad488230e Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 27 Apr 2026 21:25:31 +0100 Subject: [PATCH] feat: Enhance series item display with additional metadata and modularize template --- atlas/models.py | 2 + .../atlas/partials/_series_item.html | 33 ++++++++++++ atlas/templates/atlas/user_uploads.html | 51 +------------------ 3 files changed, 37 insertions(+), 49 deletions(-) create mode 100644 atlas/templates/atlas/partials/_series_item.html diff --git a/atlas/models.py b/atlas/models.py index 9251e3d1..c77f4113 100644 --- a/atlas/models.py +++ b/atlas/models.py @@ -2183,6 +2183,8 @@ class UncategorisedDicom(models.Model): "SeriesInstanceUID", "BodyPartExamined", "SliceThickness", + "SeriesNumber", + "StudyDate", ) tags = {} diff --git a/atlas/templates/atlas/partials/_series_item.html b/atlas/templates/atlas/partials/_series_item.html new file mode 100644 index 00000000..af857481 --- /dev/null +++ b/atlas/templates/atlas/partials/_series_item.html @@ -0,0 +1,33 @@ +
  • +
    + +
    {{ tags.SeriesDescription|default:series }}
    +
    +
    UID: {{ series }}
    + {% if tags.SeriesNumber %}
    Series #: {{ tags.SeriesNumber }}
    {% endif %} +
    Modality: {{ tags.Modality }}
    +
    Images: {{ n }}
    + {% if tags.StudyDate %}
    Study date: {{ tags.StudyDate }}
    {% endif %} +
    Uploaded: {{ date }}
    +
    +
    +
    + {% if tags.Modality %} + {{ tags.Modality }} + {% endif %} + + Popup + {% if show_tags_link %} +  |  + View tags + {% endif %} + +
    +
    +
    +
    +
  • diff --git a/atlas/templates/atlas/user_uploads.html b/atlas/templates/atlas/user_uploads.html index bdabe51c..8f191457 100644 --- a/atlas/templates/atlas/user_uploads.html +++ b/atlas/templates/atlas/user_uploads.html @@ -29,35 +29,7 @@ @@ -65,26 +37,7 @@ {% else %} {% endif %}