From adb47f405e26d47fe99b199eaed1c8282ee58213 Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Mon, 17 Nov 2025 15:00:46 -0500 Subject: [PATCH] Improve image removal mode --- isic/core/api/collection.py | 6 +++++- .../core/partials/collection_detail_actions.html | 11 ++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/isic/core/api/collection.py b/isic/core/api/collection.py index c7ac7379..40e33920 100644 --- a/isic/core/api/collection.py +++ b/isic/core/api/collection.py @@ -241,6 +241,10 @@ def remove_from_list(request, id, payload: IsicIdList): # TODO: this is a weird mixture of concerns between SSR and an API, figure out a better # way to handle this. - messages.add_message(request, messages.INFO, f"Removed {len(summary['succeeded'])} images.") + messages.add_message( + request, + messages.INFO, + f"Removed {len(summary['succeeded'])} images. It may take some time for counts to be updated.", # noqa: E501 + ) return JsonResponse(summary) diff --git a/isic/core/templates/core/partials/collection_detail_actions.html b/isic/core/templates/core/partials/collection_detail_actions.html index e1fabd45..a0449c3a 100644 --- a/isic/core/templates/core/partials/collection_detail_actions.html +++ b/isic/core/templates/core/partials/collection_detail_actions.html @@ -25,9 +25,14 @@ class="hover:bg-gray-100 hover:text-gray-900 text-gray-700 block px-4 py-2 text-sm" role="menuitem" tabindex="-1" id="menu-item-0">Edit Collection {% if not image_removal_mode %} - Remove Images + {% if collection.locked %} + Remove Images + {% else %} + Remove Images + {% endif %} {% endif %} {% endif %}