openmicroscopy/openmicroscopy — pull request #2268 by dominikl (2014-04-08 09:58:38+00:00)
Title: Remove last file annotation

Implements Task 11885: https://trac.openmicroscopy.org.uk/ome/ticket/11885
The file annotation options "Unlink" and "Delete" are replaced by a “Remove” option, which either only unlinks the file (if referenced to other DataObjects) or also deletes the file from the data repository (otherwise). In later case, the following warning dialog is shown:

![image](https://cloud.githubusercontent.com/assets/6575139/2642124/bc591cda-bf03-11e3-8330-df3c286c548f.png)

To test:
Add a few files to an image via attachment -> "Uploaded document" in the MetaData view; link some of these file attachments to another image via attachment -> "Local document";
Tests:
- Make sure there is no "Unlink" and "Delete" option anymore, just a "Remove" option.
- Remove a file attachment which you linked to both images: No warning dialog should appear, the file attachment should be just removed from that image.
- Remove a file attachment which is just linked to one image: The warning dialog should appear.
- Also check that the "Remove All" options work in the same way.