Merge remote-tracking branch 'origin/Feature_#18226'
Moved to version 1.8.0 Conflicts resolved on: .settings/org.eclipse.wst.common.component
This commit is contained in:
commit
02820d6036
10
.classpath
10
.classpath
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/gcube-ckan-datacatalog-1.7.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/gcube-ckan-datacatalog-1.8.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"/>
|
||||||
|
@ -26,15 +26,15 @@
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||||
<classpathentry excluding="**" kind="src" output="target/gcube-ckan-datacatalog-1.7.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/gcube-ckan-datacatalog-1.8.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="owner.project.facets" value="java"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/gcube-ckan-datacatalog-1.7.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/gcube-ckan-datacatalog-1.8.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
jarsExcludedFromWebInfLib=
|
jarsExcludedFromWebInfLib=
|
||||||
lastWarOutDir=/home/francesco-mangiacrapa/git/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-1.7.0-SNAPSHOT
|
lastWarOutDir=/home/francesco-mangiacrapa/git/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-1.8.0-SNAPSHOT
|
||||||
warSrcDir=src/main/webapp
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
entryPointModules=
|
entryPointModules=
|
||||||
|
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBW11dPjwvZXh0cmEtYXJncz48dm0tYXJncz48IVtDREFUQVstWG14MWddXT48L3ZtLWFyZ3M+PGVudHJ5LXBvaW50LW1vZHVsZT5vcmcuZ2N1YmUucG9ydGxldHMuZ2N1YmVja2FuLmdjdWJlY2thbmRhdGFjYXRhbG9nLkdDdWJlQ2thbkRhdGFDYXRhbG9nPC9lbnRyeS1wb2ludC1tb2R1bGU+PC9nd3QtY29tcGlsZS1zZXR0aW5ncz4\=
|
||||||
gwtSyncCodeServer=true
|
gwtSyncCodeServer=true
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
|
|
@ -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">
|
||||||
<wb-module deploy-name="gcube-ckan-datacatalog-1.7.0-SNAPSHOT">
|
<wb-module deploy-name="gcube-ckan-datacatalog-1.8.0-SNAPSHOT">
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<root>
|
||||||
|
<facet id="jst.jaxrs">
|
||||||
|
<node name="libprov">
|
||||||
|
<attribute name="provider-id" value="jaxrs-no-op-library-provider"/>
|
||||||
|
</node>
|
||||||
|
</facet>
|
||||||
|
</root>
|
|
@ -5,5 +5,6 @@
|
||||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||||
<installed facet="liferay.portlet" version="6.0"/>
|
<installed facet="liferay.portlet" version="6.0"/>
|
||||||
<installed facet="com.gwtplugins.gwt.facet" version="1.0"/>
|
<installed facet="com.gwtplugins.gwt.facet" version="1.0"/>
|
||||||
|
<installed facet="jst.jaxrs" version="2.0"/>
|
||||||
<installed facet="java" version="1.7"/>
|
<installed facet="java" version="1.7"/>
|
||||||
</faceted-project>
|
</faceted-project>
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
|
<Changeset
|
||||||
|
component="org.gcube.portlets.gcubeckan.gcube-ckan-datacatalog.1-8-0"
|
||||||
|
date="2019-12-09">
|
||||||
|
<Change>[Feature #18226]: Develop Ckan extension GUI for Zenodo
|
||||||
|
interactive linking
|
||||||
|
</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset
|
<Changeset
|
||||||
component="org.gcube.portlets.gcubeckan.gcube-ckan-datacatalog.1-7-0"
|
component="org.gcube.portlets.gcubeckan.gcube-ckan-datacatalog.1-7-0"
|
||||||
date="2019-12-04">
|
date="2019-12-04">
|
||||||
|
|
11
pom.xml
11
pom.xml
|
@ -14,7 +14,7 @@
|
||||||
<groupId>org.gcube.portlets.gcubeckan</groupId>
|
<groupId>org.gcube.portlets.gcubeckan</groupId>
|
||||||
<artifactId>gcube-ckan-datacatalog</artifactId>
|
<artifactId>gcube-ckan-datacatalog</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<version>1.7.0</version>
|
<version>1.8.0-SNAPSHOT</version>
|
||||||
<name>gCube CKAN Data Catalog</name>
|
<name>gCube CKAN Data Catalog</name>
|
||||||
<description>The gCube CKAN Data Catalog portlet</description>
|
<description>The gCube CKAN Data Catalog portlet</description>
|
||||||
|
|
||||||
|
@ -114,6 +114,13 @@
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
|
<artifactId>ckan2zenodo-publisher-widget</artifactId>
|
||||||
|
<version>[0.0.1-SNAPSHOT,1.0.0-SNAPSHOT)</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- <dependency> -->
|
<!-- <dependency> -->
|
||||||
<!-- <groupId>org.gcube.portlets.widgets</groupId> -->
|
<!-- <groupId>org.gcube.portlets.widgets</groupId> -->
|
||||||
<!-- <artifactId>session-checker</artifactId> -->
|
<!-- <artifactId>session-checker</artifactId> -->
|
||||||
|
@ -217,8 +224,6 @@
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>compile</goal>
|
<goal>compile</goal>
|
||||||
<!-- <goal>test</goal> -->
|
|
||||||
<!-- <goal>generateAsync</goal> -->
|
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
|
@ -26,9 +26,12 @@
|
||||||
<inherits name='org.gcube.datacatalogue.ckanutillibrary.CkanUtilLibrary' />
|
<inherits name='org.gcube.datacatalogue.ckanutillibrary.CkanUtilLibrary' />
|
||||||
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
||||||
|
|
||||||
|
<inherits name='org.gcube.portlets.widgets.switchbutton.SwitchButton' />
|
||||||
|
<inherits name='org.gcube.portlets.widgets.ckan2zenodopublisher.CkanToZenodoPublisher' />
|
||||||
|
|
||||||
|
|
||||||
<!-- Specify the app entry point class. -->
|
<!-- Specify the app entry point class. -->
|
||||||
<entry-point
|
<entry-point class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' />
|
||||||
class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' />
|
|
||||||
|
|
||||||
<!-- Specify the paths for translatable code -->
|
<!-- Specify the paths for translatable code -->
|
||||||
<source path='client' />
|
<source path='client' />
|
||||||
|
|
|
@ -8,6 +8,8 @@ import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.EditMetada
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.EditMetadataEventHandler;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.EditMetadataEventHandler;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.InsertMetadataEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.InsertMetadataEvent;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.InsertMetadataEventHandler;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.InsertMetadataEventHandler;
|
||||||
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.PublishOnZenodoEvent;
|
||||||
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.PublishOnZenodoEventHandler;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShareLinkEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShareLinkEvent;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShareLinkEventHandler;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShareLinkEventHandler;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowDatasetsEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowDatasetsEvent;
|
||||||
|
@ -28,6 +30,8 @@ import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowTypesE
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowTypesEventHandler;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowTypesEventHandler;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.view.GCubeCkanDataCatalogPanel;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.view.GCubeCkanDataCatalogPanel;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
||||||
|
import org.gcube.portlets.widgets.ckan2zenodopublisher.client.CkanToZendoPublisherWidget;
|
||||||
|
import org.gcube.portlets.widgets.ckan2zenodopublisher.shared.CatalogueItem;
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.CloseCreationFormEvent;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.CloseCreationFormEvent;
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.form.CreateDatasetForm;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.form.CreateDatasetForm;
|
||||||
import org.gcube.portlets_widgets.catalogue_sharing_widget.client.ShareCatalogueWidget;
|
import org.gcube.portlets_widgets.catalogue_sharing_widget.client.ShareCatalogueWidget;
|
||||||
|
@ -251,6 +255,22 @@ public class CkanEventHandlerManager {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
eventBus.addHandler(PublishOnZenodoEvent.TYPE, new PublishOnZenodoEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPublishOnZenodo(PublishOnZenodoEvent publishOnZenodoEvent) {
|
||||||
|
|
||||||
|
if(publishOnZenodoEvent.getUuidItem()!=null) {
|
||||||
|
|
||||||
|
CkanToZendoPublisherWidget publisherWidget = new CkanToZendoPublisherWidget();
|
||||||
|
CatalogueItem ci = new CatalogueItem(publishOnZenodoEvent.getUuidItem(), null, CatalogueItem.ITEM_TYPE.DATASET);
|
||||||
|
publisherWidget.publishOnZenodo(ci);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class PublishOnZenodoEvent.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||||
|
*
|
||||||
|
* Dec 9, 2019
|
||||||
|
*/
|
||||||
|
public class PublishOnZenodoEvent extends GwtEvent<PublishOnZenodoEventHandler>{
|
||||||
|
|
||||||
|
public static Type<PublishOnZenodoEventHandler> TYPE = new Type<PublishOnZenodoEventHandler>();
|
||||||
|
private String uuidItem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new insert metadata event.
|
||||||
|
*
|
||||||
|
* @param uuidItem the uuid item
|
||||||
|
*/
|
||||||
|
public PublishOnZenodoEvent(String uuidItem) {
|
||||||
|
this.uuidItem = uuidItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the uuid item.
|
||||||
|
*
|
||||||
|
* @return the uuid item
|
||||||
|
*/
|
||||||
|
public String getUuidItem() {
|
||||||
|
return uuidItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Type<PublishOnZenodoEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.EventHandler)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void dispatch(PublishOnZenodoEventHandler handler) {
|
||||||
|
handler.onPublishOnZenodo(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Interface PublishOnZenodoEventHandler.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||||
|
*
|
||||||
|
* Dec 9, 2019
|
||||||
|
*/
|
||||||
|
public interface PublishOnZenodoEventHandler extends EventHandler {
|
||||||
|
|
||||||
|
void onPublishOnZenodo(PublishOnZenodoEvent publishOnZenodoEvent);
|
||||||
|
}
|
|
@ -94,7 +94,7 @@ public class CkanGroupsPanel extends VerticalPanel{
|
||||||
role.setType(ButtonType.LINK);
|
role.setType(ButtonType.LINK);
|
||||||
role.setText("as " + org.getRole().toString().toLowerCase());
|
role.setText("as " + org.getRole().toString().toLowerCase());
|
||||||
role.addStyleName("button-as-role-style");
|
role.addStyleName("button-as-role-style");
|
||||||
role.getElement().getStyle().setProperty("pointer-events", "none");
|
role.getElement().getStyle().setProperty("pointerEvents", "none");
|
||||||
line.add(role);
|
line.add(role);
|
||||||
ListItem item = new ListItem(line);
|
ListItem item = new ListItem(line);
|
||||||
list.add(item);
|
list.add(item);
|
||||||
|
|
|
@ -5,6 +5,7 @@ package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.view;
|
||||||
|
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.EditMetadataEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.EditMetadataEvent;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.InsertMetadataEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.InsertMetadataEvent;
|
||||||
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.PublishOnZenodoEvent;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShareLinkEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShareLinkEvent;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowDatasetsEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowDatasetsEvent;
|
||||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowGroupsEvent;
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.event.ShowGroupsEvent;
|
||||||
|
@ -67,6 +68,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
|
|
||||||
// other stuff
|
// other stuff
|
||||||
private Button shareLink = new Button("Share Link");
|
private Button shareLink = new Button("Share Link");
|
||||||
|
private Button uploadToZenodo = new Button("Upload to Zenodo");
|
||||||
private Button insertMeta = new Button("Publish Item");
|
private Button insertMeta = new Button("Publish Item");
|
||||||
private Button editMeta = new Button("Edit Item");
|
private Button editMeta = new Button("Edit Item");
|
||||||
private Button manageProduct = new Button("Manage Item");
|
private Button manageProduct = new Button("Manage Item");
|
||||||
|
@ -96,6 +98,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
statistics.setType(ButtonType.LINK);
|
statistics.setType(ButtonType.LINK);
|
||||||
|
|
||||||
shareLink.setType(ButtonType.LINK);
|
shareLink.setType(ButtonType.LINK);
|
||||||
|
uploadToZenodo.setType(ButtonType.LINK);
|
||||||
insertMeta.setType(ButtonType.LINK);
|
insertMeta.setType(ButtonType.LINK);
|
||||||
editMeta.setType(ButtonType.LINK);
|
editMeta.setType(ButtonType.LINK);
|
||||||
manageProduct.setType(ButtonType.PRIMARY);
|
manageProduct.setType(ButtonType.PRIMARY);
|
||||||
|
@ -108,6 +111,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
items.setIcon(IconType.SITEMAP);
|
items.setIcon(IconType.SITEMAP);
|
||||||
types.setIcon(IconType.FILE_TEXT);
|
types.setIcon(IconType.FILE_TEXT);
|
||||||
shareLink.setIcon(IconType.SHARE);
|
shareLink.setIcon(IconType.SHARE);
|
||||||
|
uploadToZenodo.setIcon(IconType.CIRCLE_ARROW_UP);
|
||||||
myDatasets.setIcon(IconType.SITEMAP);
|
myDatasets.setIcon(IconType.SITEMAP);
|
||||||
myOrganizations.setIcon(IconType.BUILDING);
|
myOrganizations.setIcon(IconType.BUILDING);
|
||||||
myGroups.setIcon(IconType.GROUP);
|
myGroups.setIcon(IconType.GROUP);
|
||||||
|
@ -118,6 +122,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
|
|
||||||
// hide edit and insert
|
// hide edit and insert
|
||||||
shareLink.setEnabled(false);
|
shareLink.setEnabled(false);
|
||||||
|
uploadToZenodo.setEnabled(false);
|
||||||
editMeta.setVisible(false);
|
editMeta.setVisible(false);
|
||||||
insertMeta.setVisible(false);
|
insertMeta.setVisible(false);
|
||||||
manageProduct.setVisible(false);
|
manageProduct.setVisible(false);
|
||||||
|
@ -144,6 +149,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
separatorAdminButtons.setVisible(true);
|
separatorAdminButtons.setVisible(true);
|
||||||
nav.add(separatorAdminButtons);
|
nav.add(separatorAdminButtons);
|
||||||
nav.add(shareLink);
|
nav.add(shareLink);
|
||||||
|
nav.add(uploadToZenodo);
|
||||||
nav.add(insertMeta);
|
nav.add(insertMeta);
|
||||||
nav.add(editMeta);
|
nav.add(editMeta);
|
||||||
nav.add(manageProduct);
|
nav.add(manageProduct);
|
||||||
|
@ -288,6 +294,15 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
uploadToZenodo.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(ClickEvent event) {
|
||||||
|
|
||||||
|
eventBus.fireEvent(new PublishOnZenodoEvent(GCubeCkanDataCatalogPanel.getLatestSelectedProductIdentifier()));
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -339,6 +354,16 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
shareLink.setEnabled(value);
|
shareLink.setEnabled(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable publish on zenodo button.
|
||||||
|
*
|
||||||
|
* @param value the value
|
||||||
|
*/
|
||||||
|
public void enablePublishOnZenodoButton(boolean value){
|
||||||
|
uploadToZenodo.setEnabled(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show only home/statistics buttons.
|
* Show only home/statistics buttons.
|
||||||
*/
|
*/
|
||||||
|
@ -347,6 +372,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{
|
||||||
separatorMyInfo.setVisible(false);
|
separatorMyInfo.setVisible(false);
|
||||||
separatorAdminButtons.setVisible(false);
|
separatorAdminButtons.setVisible(false);
|
||||||
shareLink.setVisible(false);
|
shareLink.setVisible(false);
|
||||||
|
uploadToZenodo.setVisible(false);
|
||||||
insertMeta.setVisible(false);
|
insertMeta.setVisible(false);
|
||||||
editMeta.setVisible(false);
|
editMeta.setVisible(false);
|
||||||
myDatasets.setVisible(false);
|
myDatasets.setVisible(false);
|
||||||
|
|
|
@ -94,7 +94,7 @@ public class CkanOrganizationsPanel extends VerticalPanel{
|
||||||
role.setType(ButtonType.LINK);
|
role.setType(ButtonType.LINK);
|
||||||
role.setText("as Catalogue-" + org.getRole().toString().toLowerCase());
|
role.setText("as Catalogue-" + org.getRole().toString().toLowerCase());
|
||||||
role.addStyleName("button-as-role-style");
|
role.addStyleName("button-as-role-style");
|
||||||
role.getElement().getStyle().setProperty("pointer-events", "none");
|
role.getElement().getStyle().setProperty("pointerEvents", "none");
|
||||||
line.add(role);
|
line.add(role);
|
||||||
ListItem item = new ListItem(line);
|
ListItem item = new ListItem(line);
|
||||||
list.add(item);
|
list.add(item);
|
||||||
|
|
|
@ -441,6 +441,7 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
||||||
if(!isProductKeyMissing){
|
if(!isProductKeyMissing){
|
||||||
latestSelectedProductIdentifier = productId.toString();
|
latestSelectedProductIdentifier = productId.toString();
|
||||||
managementPanel.enableShareItemButton(productId != null && !productId.isEmpty());
|
managementPanel.enableShareItemButton(productId != null && !productId.isEmpty());
|
||||||
|
managementPanel.enablePublishOnZenodoButton(productId != null && !productId.isEmpty());
|
||||||
managementPanel.enableManageProductButton(productId != null && !productId.isEmpty() && isManageProductToShow);
|
managementPanel.enableManageProductButton(productId != null && !productId.isEmpty() && isManageProductToShow);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -15,7 +15,6 @@ import org.apache.commons.codec.binary.Base64;
|
||||||
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
||||||
import org.gcube.common.authorization.library.provider.UserInfo;
|
import org.gcube.common.authorization.library.provider.UserInfo;
|
||||||
import org.gcube.common.portal.PortalContext;
|
import org.gcube.common.portal.PortalContext;
|
||||||
import org.gcube.common.scope.api.ScopeProvider;
|
|
||||||
import org.gcube.common.scope.impl.ScopeBean;
|
import org.gcube.common.scope.impl.ScopeBean;
|
||||||
import org.gcube.common.scope.impl.ScopeBean.Type;
|
import org.gcube.common.scope.impl.ScopeBean.Type;
|
||||||
import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogue;
|
import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogue;
|
||||||
|
@ -543,9 +542,12 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
|
||||||
try{
|
try{
|
||||||
|
|
||||||
if(!SessionUtil.isIntoPortal()){
|
if(!SessionUtil.isIntoPortal()){
|
||||||
enabled = true;
|
enabled = false;
|
||||||
logger.warn("Enabling View per VRE in DEV mode");
|
logger.warn("Enabling View per VRE in DEV mode? "+enabled);
|
||||||
|
if(enabled)
|
||||||
return "/organization_vre/" + scopePerCurrentUrl.substring(scopePerCurrentUrl.lastIndexOf("/")+1,scopePerCurrentUrl.length()).toLowerCase(); //is the VRE name
|
return "/organization_vre/" + scopePerCurrentUrl.substring(scopePerCurrentUrl.lastIndexOf("/")+1,scopePerCurrentUrl.length()).toLowerCase(); //is the VRE name
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
GroupManager gm = new LiferayGroupManager();
|
GroupManager gm = new LiferayGroupManager();
|
||||||
|
|
|
@ -26,9 +26,12 @@
|
||||||
<inherits name='org.gcube.datacatalogue.ckanutillibrary.CkanUtilLibrary' />
|
<inherits name='org.gcube.datacatalogue.ckanutillibrary.CkanUtilLibrary' />
|
||||||
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
||||||
|
|
||||||
|
<inherits name='org.gcube.portlets.widgets.switchbutton.SwitchButton' />
|
||||||
|
<inherits name='org.gcube.portlets.widgets.ckan2zenodopublisher.CkanToZenodoPublisher' />
|
||||||
|
|
||||||
|
|
||||||
<!-- Specify the app entry point class. -->
|
<!-- Specify the app entry point class. -->
|
||||||
<entry-point
|
<entry-point class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' />
|
||||||
class='org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog' />
|
|
||||||
|
|
||||||
<!-- Specify the paths for translatable code -->
|
<!-- Specify the paths for translatable code -->
|
||||||
<source path='client' />
|
<source path='client' />
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
src="<%=request.getContextPath()%>/gCubeCkanDataCatalog/gCubeCkanDataCatalog.nocache.js"></script>
|
src="<%=request.getContextPath()%>/gCubeCkanDataCatalog/gCubeCkanDataCatalog.nocache.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript"
|
<!-- <script type="text/javascript" -->
|
||||||
src='<%=request.getContextPath()%>/js/jquery.min.js'></script>
|
<%-- src='<%=request.getContextPath()%>/js/jquery.min.js'></script> --%>
|
||||||
|
|
||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
src='<%=request.getContextPath()%>/js/jquery.autosize.js'></script>
|
src='<%=request.getContextPath()%>/js/jquery.autosize.js'></script>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
||||||
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||||
version="3.0">
|
version="3.0">
|
||||||
|
@ -54,6 +55,17 @@
|
||||||
<servlet-class>org.gcube.portlets_widgets.catalogue_sharing_widget.server.ShareServicesImpl</servlet-class>
|
<servlet-class>org.gcube.portlets_widgets.catalogue_sharing_widget.server.ShareServicesImpl</servlet-class>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
|
<!-- Servlets -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>ckanToZenodoServlet</servlet-name>
|
||||||
|
<servlet-class>org.gcube.portlets.widgets.ckan2zenodopublisher.server.CkanToZenodoPublisherServiceImpl</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>ckanToZenodoServlet</servlet-name>
|
||||||
|
<url-pattern>/gCubeCkanDataCatalog/ckantozenodo</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>shareservices</servlet-name>
|
<servlet-name>shareservices</servlet-name>
|
||||||
<url-pattern>/gCubeCkanDataCatalog/shareservices</url-pattern>
|
<url-pattern>/gCubeCkanDataCatalog/shareservices</url-pattern>
|
||||||
|
|
Loading…
Reference in New Issue