DBCDK / biblo-admin

Admin application for biblo
0 stars 3 forks source link

Mark campaign images for permanent storage #150

Closed kasperg closed 8 years ago

kasperg commented 8 years ago

This requires us to properly mark uploaded files as permanent and register/deregister usage of them. Otherwise updates of existing campaigns are not possible due to validation for managed_file form elements.

To achieve this file fields have been added to the Campaign model and the Campaign repository have been updated to handle loading and saving of campaign files. Corresponding logic has been removed from the Campaign form.

File usage expects referenced types to be entities. That is not the case for us but we still need to register usage. Consequently we remove the file usage field + link from the files list view.

This fixes #149.