Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion isic/core/api/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
11 changes: 8 additions & 3 deletions isic/core/templates/core/partials/collection_detail_actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -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</a>
{% if not image_removal_mode %}
<a href="{% querystring image_removal_mode="1" %}"
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">Remove Images</a>
{% if collection.locked %}
<span class="text-gray-400 block px-4 py-2 text-sm cursor-not-allowed" role="menuitem"
tabindex="-1" title="Cannot remove images from a locked collection">Remove Images</span>
{% else %}
<a href="{% querystring image_removal_mode="1" %}"
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">Remove Images</a>
{% endif %}
{% endif %}
</div>
{% endif %}
Expand Down