parent
ed93d7ab43
commit
a596e180e5
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry including="**/*.java" kind="src" output="target/geoportal-data-entry-app-3.0.2-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry including="**/*.java" kind="src" output="target/geoportal-data-entry-app-3.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
@ -31,5 +31,5 @@
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/geoportal-data-entry-app-3.0.2-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/geoportal-data-entry-app-3.1.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
jarsExcludedFromWebInfLib=
|
jarsExcludedFromWebInfLib=
|
||||||
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-entry-app/target/geoportal-data-entry-app-3.0.2-SNAPSHOT
|
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-entry-app/target/geoportal-data-entry-app-3.1.0-SNAPSHOT
|
||||||
warSrcDir=src/main/webapp
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,8 +80,16 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-module deploy-name="geoportal-data-entry-app-3.0.2-SNAPSHOT">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<wb-module deploy-name="geoportal-data-entry-app-3.1.0-SNAPSHOT">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -163,7 +171,11 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -245,7 +257,11 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -327,7 +343,11 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -361,10 +381,14 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
<dependent-module archiveName="geoportal-data-common-2.0.2.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
|
<dependent-module archiveName="geoportal-data-common-2.0.3-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -446,7 +470,11 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="context-root" value="geoportal-data-entry-app"/>
|
<property name="context-root" value="geoportal-data-entry-app"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -528,7 +556,11 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/>
|
<property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -610,7 +642,11 @@
|
||||||
|
|
||||||
|
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,13 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [v3.1.0-SNAPSHOT] - 2023-02-09
|
||||||
|
|
||||||
|
#### Enhancements
|
||||||
|
|
||||||
|
- [#24569] The Edit operation is available only in the "DRAFT" phase
|
||||||
|
- [#24571] The "Create Relation" operation is available only in the "DRAFT" phase
|
||||||
|
|
||||||
## [v3.0.2] - 2023-02-02
|
## [v3.0.2] - 2023-02-02
|
||||||
|
|
||||||
#### Fixes
|
#### Fixes
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -14,7 +14,7 @@
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>geoportal-data-entry-app</artifactId>
|
<artifactId>geoportal-data-entry-app</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<version>3.0.2</version>
|
<version>3.1.0-SNAPSHOT</version>
|
||||||
<name>GeoPortal Data Entry App</name>
|
<name>GeoPortal Data Entry App</name>
|
||||||
<description>The GeoPortal Data Entry App is an application to build the web forms for data entries needed to create projects/documents (based on UCD) in the D4Science Geoportal service</description>
|
<description>The GeoPortal Data Entry App is an application to build the web forms for data entries needed to create projects/documents (based on UCD) in the D4Science Geoportal service</description>
|
||||||
<scm>
|
<scm>
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.gcube.portlets.user.geoportaldataentry.client;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.gcube.application.geoportalcommon.shared.geoportal.WORKFLOW_PHASE;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.GEOPORTAL_DATA_HANDLER;
|
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.GEOPORTAL_DATA_HANDLER;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.HandlerDeclarationDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.HandlerDeclarationDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
|
||||||
|
@ -44,11 +45,21 @@ public class ConstantsGeoPortalDataEntryApp {
|
||||||
public static final RootPanel ROOT_PANEL_DIV_PORTLET = RootPanel.get(ConstantsGeoPortalDataEntryApp.DIV_PORTLET_ID);
|
public static final RootPanel ROOT_PANEL_DIV_PORTLET = RootPanel.get(ConstantsGeoPortalDataEntryApp.DIV_PORTLET_ID);
|
||||||
|
|
||||||
public static final String CSS_CLASS_GEOPORTAL_LOADERS_CENTER = "geoportal-loaders-center";
|
public static final String CSS_CLASS_GEOPORTAL_LOADERS_CENTER = "geoportal-loaders-center";
|
||||||
|
|
||||||
public static final String WORKFLOW_ACTION_POST_CREATION_ACTION_ID = "post_creation_action";
|
public static final String WORKFLOW_ACTION_POST_CREATION_ACTION_ID = "post_creation_action";
|
||||||
|
|
||||||
public static final DateTimeFormat DATE_TIME_FORMAT = DateTimeFormat.getFormat("dd MMMM yyyy");
|
public static final DateTimeFormat DATE_TIME_FORMAT = DateTimeFormat.getFormat("dd MMMM yyyy");
|
||||||
|
|
||||||
|
public static final String ALERT_MESSAGE_PROJECT_NOT_EDITABLE = "A Project can only be edited/updated in "
|
||||||
|
+ WORKFLOW_PHASE.DRAFT.name()
|
||||||
|
+ " phase. You need to perform the step 'Reject' or 'UnPublish' to take back the project in "
|
||||||
|
+ WORKFLOW_PHASE.DRAFT.name() + " phase.";
|
||||||
|
|
||||||
|
public static final String ALERT_MESSAGE_CREATE_RELATION_FORBIDDEN = "The Create Relation operation can be performed only in "
|
||||||
|
+ WORKFLOW_PHASE.DRAFT.name()
|
||||||
|
+ " phase. You need to perform the step 'Reject' or 'UnPublish' to take back the project in "
|
||||||
|
+ WORKFLOW_PHASE.DRAFT.name() + " phase.";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Enum ACTION_PERFORMED_ON_ITEM.
|
* The Enum ACTION_PERFORMED_ON_ITEM.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1514,6 +1514,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
}
|
}
|
||||||
|
|
||||||
case EDIT_PROJECT: {
|
case EDIT_PROJECT: {
|
||||||
|
|
||||||
final Modal modal3 = new Modal(true, true);
|
final Modal modal3 = new Modal(true, true);
|
||||||
modal3.setTitle(
|
modal3.setTitle(
|
||||||
"<span style='font-size:20px;'>Edit: <span style='color:#555; font-size:20px;'>"
|
"<span style='font-size:20px;'>Edit: <span style='color:#555; font-size:20px;'>"
|
||||||
|
@ -1523,35 +1524,60 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
modal3.setCloseVisible(true);
|
modal3.setCloseVisible(true);
|
||||||
((Element) modal3.getElement().getChildNodes().getItem(1))
|
((Element) modal3.getElement().getChildNodes().getItem(1))
|
||||||
.addClassName("modal-body-custom");
|
.addClassName("modal-body-custom");
|
||||||
|
|
||||||
boolean isPublishedProject = false;
|
//#24569
|
||||||
|
boolean isNotInDRAFT = false;
|
||||||
if(resultDocumentDV.getLifecycleInfo()!=null) {
|
|
||||||
|
if (resultDocumentDV.getLifecycleInfo() != null) {
|
||||||
String phase = resultDocumentDV.getLifecycleInfo().getPhase();
|
String phase = resultDocumentDV.getLifecycleInfo().getPhase();
|
||||||
if(phase!=null && phase.compareToIgnoreCase(WORKFLOW_PHASE.PUBLISHED.getLabel())==0) {
|
// IF the project is not in DRAFT phase, showing an alert and no Update Mode will
|
||||||
|
// be activated
|
||||||
Alert alert = new Alert("A '"+WORKFLOW_PHASE.PUBLISHED.getLabel()+"' project cannot be updated.");
|
if (phase != null && phase.compareToIgnoreCase(WORKFLOW_PHASE.DRAFT.getLabel()) != 0) {
|
||||||
|
|
||||||
|
Alert alert = new Alert(
|
||||||
|
ConstantsGeoPortalDataEntryApp.ALERT_MESSAGE_PROJECT_NOT_EDITABLE);
|
||||||
alert.setType(AlertType.WARNING);
|
alert.setType(AlertType.WARNING);
|
||||||
alert.setClose(false);
|
alert.setClose(false);
|
||||||
modal3.add(alert);
|
modal3.add(alert);
|
||||||
|
|
||||||
isPublishedProject = true;
|
isNotInDRAFT = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EditModeRecord emr = new EditModeRecord(appManagerBus, resultDocumentDV);
|
EditModeRecord emr = new EditModeRecord(appManagerBus, resultDocumentDV);
|
||||||
modal3.add(emr);
|
modal3.add(emr);
|
||||||
modal3.show();
|
modal3.show();
|
||||||
|
|
||||||
if(isPublishedProject) {
|
if (isNotInDRAFT) {
|
||||||
emr.noUpdateMode();
|
emr.noUpdateMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CREATE_RELATION: {
|
case CREATE_RELATION: {
|
||||||
|
|
||||||
mainTabPanel.showCreateRelationPanel(true, resultDocumentDV);
|
//#24571
|
||||||
|
boolean isNotInDRAFT = false;
|
||||||
|
|
||||||
|
if (resultDocumentDV.getLifecycleInfo() != null) {
|
||||||
|
String phase = resultDocumentDV.getLifecycleInfo().getPhase();
|
||||||
|
// IF the project is not in DRAFT, showing an alert and the no Update Mode will
|
||||||
|
// be activated
|
||||||
|
if (phase != null && phase.compareToIgnoreCase(WORKFLOW_PHASE.DRAFT.getLabel()) != 0) {
|
||||||
|
|
||||||
|
String msg = ConstantsGeoPortalDataEntryApp.ALERT_MESSAGE_CREATE_RELATION_FORBIDDEN;
|
||||||
|
ModalWindow modalW = new ModalWindow(new Image(Images.ICONS.accessDenied()),
|
||||||
|
"Forbidden: " + action, msg, AlertType.WARNING);
|
||||||
|
modalW.show();
|
||||||
|
|
||||||
|
isNotInDRAFT = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Allowing the Create Relation only in DRAFT phase
|
||||||
|
if (!isNotInDRAFT) {
|
||||||
|
mainTabPanel.showCreateRelationPanel(true, resultDocumentDV);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue