From ce83dc5bb2b2f7a9e04fe9ce62bdaee0f0527519 Mon Sep 17 00:00:00 2001 From: buczekp <buczekp> Date: Mon, 18 Jul 2011 13:56:51 +0000 Subject: [PATCH] [LMS-2365] improved message in revert dialog SVN: 22176 --- .../ui/deletion/RevertDeletionConfirmationDialog.java | 10 ++++++---- .../systemsx/cisd/openbis/public/common-dictionary.js | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/deletion/RevertDeletionConfirmationDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/deletion/RevertDeletionConfirmationDialog.java index 78867a49550..3cfd4b0203a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/deletion/RevertDeletionConfirmationDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/deletion/RevertDeletionConfirmationDialog.java @@ -25,6 +25,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.renderer.DateRenderer; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractDataConfirmationDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.lang.StringEscapeUtils; import ch.systemsx.cisd.openbis.generic.shared.basic.BasicConstant; import ch.systemsx.cisd.openbis.generic.shared.basic.IEntityWithDeletionInformation; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; @@ -83,13 +84,14 @@ public final class RevertDeletionConfirmationDialog extends String deletedEntity = deletedEntityOrNull.getEntityKind().getDescription() + " '" + deletedEntityOrNull.getCode() + "'"; - String deletedBy = deletedEntityOrNull.getDeletion().getRegistrator().toString(); + Deletion deletion = deletedEntityOrNull.getDeletion(); + String deletedBy = deletion.getRegistrator().toString(); String deletionDate = - DateRenderer.renderDate( - deletedEntityOrNull.getDeletion().getRegistrationDate(), + DateRenderer.renderDate(deletion.getRegistrationDate(), BasicConstant.DATE_WITHOUT_TIMEZONE_PATTERN); + String deletionReason = StringEscapeUtils.unescapeHtml(deletion.getReason()); return viewContext.getMessage(Dict.REVERT_ENTITY_DELETION_CONFIRMATION_MSG, - deletedEntity, deletedBy, deletionDate); + deletedEntity, deletedBy, deletionDate, deletionReason); } else { return viewContext.getMessage(Dict.REVERT_DELETIONS_CONFIRMATION_MSG, data.size()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js index c8c83d05c91..7d5e3bfccfe 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js @@ -81,7 +81,7 @@ var common = { button_empty_trash: "Empty Trash", button_delete_permanently: "Delete Permanently", revert_deletions_confirmation_title: "Confirm Revert", - revert_entity_deletion_confirmation_msg: "Are you sure you want to revert deletion of {0}?</br></br><b>NOTE:</b> This will in fact revert deletion of all entities deleted together with {0} by {1} on {2}.", + revert_entity_deletion_confirmation_msg: "Are you sure you want to revert deletion of {0}?</br></br><b>NOTE:</b> This will in fact revert deletion of all entities deleted together with {0} by {1} on {2} with following reason:</br><i>{3}</i>", revert_deletions_confirmation_msg: "Are you sure you want to revert {0} selected deletion(s)?", permanent_deletions_confirmation_title: "Confirm Permanent Deletion", permanent_deletions_confirmation_msg: "Are you sure you want to <b>permanently</b> delete all entities that were moved to trash in selected {0} deletion(s)?</br></br>You can't undo this action.", -- GitLab