From c1e351c7db4b47661b84989750827ec7ab67c497 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 11 May 2026 09:25:41 +0100 Subject: [PATCH] feat: Enhance user uploads with support for partial imports and improved UI feedback --- .../atlas/partials/_series_item.html | 17 +- atlas/templates/atlas/user_uploads.html | 340 ++++++++++++++---- atlas/views.py | 11 +- 3 files changed, 288 insertions(+), 80 deletions(-) diff --git a/atlas/templates/atlas/partials/_series_item.html b/atlas/templates/atlas/partials/_series_item.html index af857481..45c8551f 100644 --- a/atlas/templates/atlas/partials/_series_item.html +++ b/atlas/templates/atlas/partials/_series_item.html @@ -1,7 +1,12 @@ -
  • +
  • -
    {{ tags.SeriesDescription|default:series }}
    +
    + {{ tags.SeriesDescription|default:series }} + {% if series_is_partial %} + Part imported + {% endif %} +
    UID: {{ series }}
    {% if tags.SeriesNumber %}
    Series #: {{ tags.SeriesNumber }}
    {% endif %} @@ -26,6 +31,14 @@ >View tags {% endif %} + {% if series_is_partial %} + + {% endif %}
    diff --git a/atlas/templates/atlas/user_uploads.html b/atlas/templates/atlas/user_uploads.html index 6018a9ae..951da79e 100644 --- a/atlas/templates/atlas/user_uploads.html +++ b/atlas/templates/atlas/user_uploads.html @@ -18,7 +18,7 @@
    {% if grouped_series %} {% for study_uid, study in grouped_series %} -
    +
    {{ study.description|default:"(no description)" }} ({{ study_uid }}) — {{ study.series|length }} series @@ -27,6 +27,20 @@ + {% if study.partial_imported_uids %} +
    +
    + Partial import detected: + {{ study.partial_imported_count }} series in this study already exist. + The highlighted rows can finish importing the remaining images. +
    + +
    + {% endif %} {% if study.import_suggestions %}
    Study already imported: @@ -51,7 +65,19 @@ {% endif %}
      {% for series, n, tags, date in study.series %} - {% include 'atlas/partials/_series_item.html' with show_tags_link=True %} + {% if series in study.partial_imported_uids %} + {% if case %} + {% include 'atlas/partials/_series_item.html' with show_tags_link=True series_is_partial=True series_item_classes='series-item--partial-import' import_case_id=case.pk %} + {% else %} + {% include 'atlas/partials/_series_item.html' with show_tags_link=True series_is_partial=True series_item_classes='series-item--partial-import' %} + {% endif %} + {% else %} + {% if case %} + {% include 'atlas/partials/_series_item.html' with show_tags_link=True series_is_partial=False series_item_classes='' import_case_id=case.pk %} + {% else %} + {% include 'atlas/partials/_series_item.html' with show_tags_link=True series_is_partial=False series_item_classes='' %} + {% endif %} + {% endif %} {% endfor %}
    @@ -59,7 +85,11 @@ {% else %}
      {% for series, n, tags, date in series_list %} - {% include 'atlas/partials/_series_item.html' %} + {% if case %} + {% include 'atlas/partials/_series_item.html' with series_is_partial=False series_item_classes='' import_case_id=case.pk %} + {% else %} + {% include 'atlas/partials/_series_item.html' with series_is_partial=False series_item_classes='' %} + {% endif %} {% endfor %}
    {% endif %} @@ -68,51 +98,79 @@ {% if case %}

    Importing into case: {{case}}

    {% endif %} -
    Upload settings -
    -
    -
    Select how series should be ordered when uploaded -
    - This will affect how series are displayed when viewing with the built in site viewer. By default when exporting from Insight the order is not maintained so you should choose to order either by slice location or instance number.
    - If you are not sure, leave this as the default. -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    -
    -
    +
    +
    +
    +
    +
    Selected: 0
    +
    Keep this page open while imports are running.
    +
    +
    + Upload settings + +
    + Select how series should be ordered when uploaded +
    + This will affect how series are displayed when viewing with the built in site viewer. By default when exporting from Insight the order is not maintained so you should choose to order either by slice location or instance number. + If you are not sure, leave this as the default. +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    - -
    -
    -
    Selected: 0
    - + - - +
    + + + + +
    + +
    +
    -
    -
    Loading...
    -
    @@ -165,6 +223,8 @@