From 00dfaf98884963f03acbe5455ae0bab898e995bb Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 15 Dec 2025 11:49:06 +0000 Subject: [PATCH] Add bulk edit functionality for CID users: implement endpoint and update templates for bulk add/remove actions --- atlas/urls.py | 5 + generic/templates/generic/exam_cids_edit.html | 297 ++++++++++++------ .../generic/partials/cid_user_li.html | 22 ++ .../generic/partials/cid_user_list.html | 8 + generic/urls.py | 5 + generic/views.py | 102 ++++++ 6 files changed, 347 insertions(+), 92 deletions(-) create mode 100644 generic/templates/generic/partials/cid_user_li.html create mode 100644 generic/templates/generic/partials/cid_user_list.html diff --git a/atlas/urls.py b/atlas/urls.py index ee8907f0..2fdcbbee 100755 --- a/atlas/urls.py +++ b/atlas/urls.py @@ -361,6 +361,11 @@ urlpatterns = [ views.GenericExamViews.exam_json_edit, name="exam_json_edit", ), + path( + "collection//cid_bulk_edit", + views.GenericExamViews.exam_cid_bulk_edit, + name="exam_cid_bulk_edit", + ), path( "collection//dicom_json", views.collection_dicom_json, diff --git a/generic/templates/generic/exam_cids_edit.html b/generic/templates/generic/exam_cids_edit.html index 15d9f35e..eaa33d8b 100644 --- a/generic/templates/generic/exam_cids_edit.html +++ b/generic/templates/generic/exam_cids_edit.html @@ -19,8 +19,8 @@ {% if current_cid_users or available_cid_users %} {% endif %} - - + + @@ -35,112 +35,225 @@
    {% for cid in current_cid_users %} -
  • -
    -
    -
    {{cid.cid}} [{{cid.passcode}}]
    - Added -
    -
    {{cid.name}} · {{cid.email}}
    -
    -
    - Edit - -
    -
  • + {% include 'generic/partials/cid_user_li.html' with cid=cid current=True exam=exam %} {% endfor %} {% for cid in available_cid_users %} -
  • -
    -
    -
    {{cid.cid}} [{{cid.passcode}}]
    - Not added -
    -
    {{cid.name}} · {{cid.email}}
    -
    -
    - Edit - -
    -
  • + {% include 'generic/partials/cid_user_li.html' with cid=cid current=False exam=exam %} {% endfor %}