diff --git a/CHANGELOG.md b/CHANGELOG.md index 53fd7bd..7020671 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Integrated new Uri-Resolver-Manager [#27160] - Added Get Shareable Link facility [#27120] - Added optional message when performing lifecycle step [#27192] -- Enforced deleteProject method +- Enforced deleteProject method/UX ## [v3.2.2] - 2024-01-11 diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoPortalDataEntryApp.java b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoPortalDataEntryApp.java index 11c4639..dd94c31 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoPortalDataEntryApp.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoPortalDataEntryApp.java @@ -1409,15 +1409,18 @@ public class GeoPortalDataEntryApp implements EntryPoint { switch (status) { case OK: alertType = AlertType.SUCCESS; - statusMsg = "performed with " + status.getLabel().toUpperCase()+"!"; + statusMsg = "performed with " + status.getLabel().toUpperCase() + + "!"; break; case WARNING: alertType = AlertType.WARNING; - statusMsg = "performed with " + status.getLabel().toUpperCase()+"!"; + statusMsg = "performed with " + status.getLabel().toUpperCase() + + "!"; break; case ERROR: alertType = AlertType.ERROR; - statusMsg = "performed with " + status.getLabel().toUpperCase()+"!"; + statusMsg = "performed with " + status.getLabel().toUpperCase() + + "!"; break; default: alertType = AlertType.INFO; @@ -2003,6 +2006,32 @@ public class GeoPortalDataEntryApp implements EntryPoint { alert.setClose(false); hp.add(alert); + VerticalPanel vp = new VerticalPanel(); + vp.getElement().getStyle().setMarginTop(20, Unit.PX); + vp.add(new Label("Check outcome in the Publication Report")); + Button buttonShowPublicationReport = new Button( + "Show Publication Report"); + buttonShowPublicationReport.setType(ButtonType.INFO); + buttonShowPublicationReport.addClickHandler(new ClickHandler() { + + @Override + public void onClick(ClickEvent event) { + modal.hide(); + appManagerBus + .fireEvent(new OperationOnItemEvent( + Arrays.asList(resultDocumentDV), + OPERATION_ON_ITEM.VIEW_REPORT)); + + } + }); + buttonShowPublicationReport.getElement().getStyle().setMarginTop(10, + Unit.PX); + buttonShowPublicationReport.getElement().getStyle() + .setMarginBottom(20, Unit.PX); + vp.add(buttonShowPublicationReport); + + modal.add(vp); + } @Override diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataentry/server/GeoportalDataEntryServiceImpl.java b/src/main/java/org/gcube/portlets/user/geoportaldataentry/server/GeoportalDataEntryServiceImpl.java index 7889e1e..43c1cbb 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataentry/server/GeoportalDataEntryServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataentry/server/GeoportalDataEntryServiceImpl.java @@ -1014,7 +1014,7 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen try { Project deletedP = client.getProjectByID(profileID, projectID); if(deletedP!=null) { - String error = "The project with id: "+projectID+" still exists"; + String error = "The project with id "+projectID+" still exists"; LOG.error(error +". Sending exception.."); throw new Exception(error); } @@ -1029,7 +1029,7 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen } catch (Exception e) { LOG.error("Error on deleting the project with id: " + projectID, e); - throw new Exception(e.getMessage()); + throw new Exception("Error occurred on the server side when deleting the project"); } }