Repository navigation
Add individual purge buttons in Admin Trash page #9228
cgoldshtein
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
The Admin Trash page (/ckan-admin/trash) only allows bulk purging of all deleted entities of a type. Clicking "Purge" for datasets/organizations/groups purges all entities of that type, with no way to selectively purge individual items.
Current code: TrashView.purge_entity() in ckan/ckan/views/admin.py iterates through all entities.
Proposed Solution
Add individual purge buttons for each entity in the trash list, allowing selective purging.
Backend - Modify TrashView.post():
Frontend - Add button per entity in template:
Benefits
Selective purging instead of all-or-nothing
Reduces accidental data loss
Maintains backward compatibility (bulk purge remains)
Files affected: ckan/ckan/views/admin.py, ckan/ckan/templates-bs3/admin/trash.html
All reactions