Commit d6c581d0 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

fix: 1990 allow delete deposit data file from file detail page and add confirmation on list

parent 1a964c2f
......@@ -411,7 +411,17 @@ export class DepositFileContainer extends AbstractDetailEditRoutable<Deposit, De
}
private _deleteDataFile(parentId: string, dataFile: DepositDataFile): void {
this._store.dispatch(new DepositDataFileAction.Delete(parentId, dataFile.resId));
const deleteData = this._storeDialogService.deleteData(StateEnum.deposit_dataFile);
deleteData.name = dataFile.fileName;
this.subscribe(DialogUtil.open(this._dialog, DeleteDialog, deleteData,
{
width: "400px",
},
isConfirmed => {
if (isTrue(isConfirmed)) {
this._store.dispatch(new DepositDataFileAction.Delete(parentId, dataFile.resId));
}
}));
}
private _showPreview(dataFile: DepositDataFile): void {
......
......@@ -45,6 +45,9 @@ export class StoreDialogService extends AbstractStoreDialogService {
sharedDeleteDialogData.message = MARK_AS_TRANSLATABLE("deposit.dialog.delete.message");
sharedDeleteDialogData.resourceNameSpace = depositActionNameSpace;
}
if (state === StateEnum.deposit_dataFile) {
sharedDeleteDialogData.message = MARK_AS_TRANSLATABLE("depositDataFile.dialog.delete.message");
}
if (state === StateEnum.admin_organizationalUnit) {
sharedDeleteDialogData.message = MARK_AS_TRANSLATABLE("admin.organizationalUnit.dialog.delete.message");
sharedDeleteDialogData.resourceNameSpace = adminOrganizationalUnitActionNameSpace;
......
......@@ -803,6 +803,13 @@
"submissionPolicy": "Zeigt die Optionen an, die bei der Erstellung Ihrer Datenablage (d.h. der Organisationseinheit) definiert wurden. \n\nWeitere Informationen finden Sie in der Dokumentation"
}
},
"depositDataFile": {
"dialog": {
"delete": {
"message": "depositDataFile.dialog.delete.message"
}
}
},
"dialog": {
"createEdit": {
"button": {
......@@ -1792,10 +1799,22 @@
}
},
"dip": {
"dialog": {
"delete": {
"message": "preservation.dip.dialog.delete.message"
}
},
"home": {
"subtitle": "Informationspaket zur Veröffentlichung"
}
},
"dipDataFile": {
"dialog": {
"delete": {
"message": "preservation.dipDataFile.dialog.delete.message"
}
}
},
"job": {
"button": {
"init": "Initialisierung"
......
......@@ -803,6 +803,13 @@
"submissionPolicy": "Shows the options that were defined during your preservation space's (i.e. organizational unit) creation. \n\nSee the documentation for more information"
}
},
"depositDataFile": {
"dialog": {
"delete": {
"message": "Are you sure you want to delete the following deposit file: '{{name}}' ?"
}
}
},
"dialog": {
"createEdit": {
"button": {
......@@ -1792,10 +1799,22 @@
}
},
"dip": {
"dialog": {
"delete": {
"message": "Are you sure you want to delete the following DIP: '{{name}}' ?"
}
},
"home": {
"subtitle": "Dissemination Information Package"
}
},
"dipDataFile": {
"dialog": {
"delete": {
"message": "Are you sure you want to delete the following DIP file: '{{name}}' ?"
}
}
},
"job": {
"button": {
"init": "Init"
......
......@@ -803,6 +803,13 @@
"submissionPolicy": "Montre les options qui ont été choisies lors de la création de votre espace de préservation (ou unité organisationnelle).\n\nVoir la documentation pour plus d'informations"
}
},
"depositDataFile": {
"dialog": {
"delete": {
"message": "Êtes-vous sûr de vouloir supprimer le fichier du dépôt '{{name}}'?"
}
}
},
"dialog": {
"createEdit": {
"button": {
......@@ -1792,10 +1799,22 @@
}
},
"dip": {
"dialog": {
"delete": {
"message": "Êtes-vous sûr de vouloir supprimer le DIP '{{name}}'?"
}
},
"home": {
"subtitle": "Paquet d'information à disséminer"
}
},
"dipDataFile": {
"dialog": {
"delete": {
"message": "Êtes-vous sûr de vouloir supprimer le fichier du DIP '{{name}}'?"
}
}
},
"job": {
"button": {
"init": "Initialiser"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment