comic / grand-challenge.org

A platform for end-to-end development of machine learning solutions in biomedical imaging
https://grand-challenge.org
Apache License 2.0
168 stars 50 forks source link

Add CIVSet bulk delete view #3290

Closed amickan closed 3 months ago

amickan commented 3 months ago

This adds a bulk delete view for CIV sets and implements this for display sets.

A user can select a subset of (editable) display sets or all display sets (for the given reader study): image

... and needs to confirm their selection for actual deletion to happen. image

The initial selection of items is sent to a FormView via a GET request. The FormView prepopulates the multi-model select field on the confirmation form with the preselected items and renders that. The user could deselect a few of the options on the confirmation view if they wanted, upon submission, the items are deleted.

The approach presented here aligns with how the Django admin does things. I also played around with an alternative implementation where the list view is essentially a form with just one ModelMultipleChoiceField using the CheckboxSelectMultiple widget to select items. Customizing the display of the items in the select widget to show all the other information that is currently displayed, however, was messy and nearly impossible to align to make it looks like a table. Also, enabling sorting and filtering would require a lot of custom code. So dropped that option.

Closes #3169