diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml index 62e6b8a..4c3f59d 100644 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -5,6 +5,6 @@ - + diff --git a/pom.xml b/pom.xml index 4274efd..72c3008 100644 --- a/pom.xml +++ b/pom.xml @@ -118,6 +118,7 @@ org.gcube.portlets.widgets ckan2zenodo-publisher-widget [0.0.1-SNAPSHOT,1.0.0-SNAPSHOT) + compile diff --git a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/GCubeCkanDataCatalog.gwt.xml b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/GCubeCkanDataCatalog.gwt.xml index fde3d10..0dea5be 100644 --- a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/GCubeCkanDataCatalog.gwt.xml +++ b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/GCubeCkanDataCatalog.gwt.xml @@ -25,13 +25,13 @@ - + + - + diff --git a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/CkanEventHandlerManager.java b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/CkanEventHandlerManager.java index b2d02a4..e6ceb6d 100644 --- a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/CkanEventHandlerManager.java +++ b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/CkanEventHandlerManager.java @@ -266,6 +266,7 @@ public class CkanEventHandlerManager { CkanToZendoPublisherWidget publisherWidget = new CkanToZendoPublisherWidget(); CatalogueItem ci = new CatalogueItem(publishOnZenodoEvent.getUuidItem(), null, CatalogueItem.ITEM_TYPE.DATASET); publisherWidget.publishOnZenodo(ci); + } } diff --git a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/view/CkanGroupsPanel.java b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/view/CkanGroupsPanel.java index 0ed5c5c..c120caf 100644 --- a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/view/CkanGroupsPanel.java +++ b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/view/CkanGroupsPanel.java @@ -94,7 +94,7 @@ public class CkanGroupsPanel extends VerticalPanel{ role.setType(ButtonType.LINK); role.setText("as " + org.getRole().toString().toLowerCase()); role.addStyleName("button-as-role-style"); - role.getElement().getStyle().setProperty("pointer-events", "none"); + role.getElement().getStyle().setProperty("pointerEvents", "none"); line.add(role); ListItem item = new ListItem(line); list.add(item); diff --git a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/view/CkanMetadataManagementPanel.java b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/view/CkanMetadataManagementPanel.java index 7630f34..6021b60 100644 --- a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/view/CkanMetadataManagementPanel.java +++ b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/view/CkanMetadataManagementPanel.java @@ -68,7 +68,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{ // other stuff private Button shareLink = new Button("Share Link"); - private Button publishOnZenodoLink = new Button("Publish on Zenodo"); + private Button uploadToZenodo = new Button("Upload to Zenodo"); private Button insertMeta = new Button("Publish Item"); private Button editMeta = new Button("Edit Item"); private Button manageProduct = new Button("Manage Item"); @@ -98,7 +98,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{ statistics.setType(ButtonType.LINK); shareLink.setType(ButtonType.LINK); - publishOnZenodoLink.setType(ButtonType.LINK); + uploadToZenodo.setType(ButtonType.LINK); insertMeta.setType(ButtonType.LINK); editMeta.setType(ButtonType.LINK); manageProduct.setType(ButtonType.PRIMARY); @@ -111,7 +111,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{ items.setIcon(IconType.SITEMAP); types.setIcon(IconType.FILE_TEXT); shareLink.setIcon(IconType.SHARE); - publishOnZenodoLink.setIcon(IconType.ANCHOR); + uploadToZenodo.setIcon(IconType.CIRCLE_ARROW_UP); myDatasets.setIcon(IconType.SITEMAP); myOrganizations.setIcon(IconType.BUILDING); myGroups.setIcon(IconType.GROUP); @@ -122,7 +122,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{ // hide edit and insert shareLink.setEnabled(false); - publishOnZenodoLink.setEnabled(false); + uploadToZenodo.setEnabled(false); editMeta.setVisible(false); insertMeta.setVisible(false); manageProduct.setVisible(false); @@ -149,7 +149,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{ separatorAdminButtons.setVisible(true); nav.add(separatorAdminButtons); nav.add(shareLink); - nav.add(publishOnZenodoLink); + nav.add(uploadToZenodo); nav.add(insertMeta); nav.add(editMeta); nav.add(manageProduct); @@ -295,7 +295,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{ } }); - publishOnZenodoLink.addClickHandler(new ClickHandler() { + uploadToZenodo.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { @@ -360,7 +360,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{ * @param value the value */ public void enablePublishOnZenodoButton(boolean value){ - publishOnZenodoLink.setEnabled(value); + uploadToZenodo.setEnabled(value); } @@ -372,7 +372,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{ separatorMyInfo.setVisible(false); separatorAdminButtons.setVisible(false); shareLink.setVisible(false); - publishOnZenodoLink.setVisible(false); + uploadToZenodo.setVisible(false); insertMeta.setVisible(false); editMeta.setVisible(false); myDatasets.setVisible(false); diff --git a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/view/CkanOrganizationsPanel.java b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/view/CkanOrganizationsPanel.java index be30281..5ea3284 100644 --- a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/view/CkanOrganizationsPanel.java +++ b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/view/CkanOrganizationsPanel.java @@ -94,7 +94,7 @@ public class CkanOrganizationsPanel extends VerticalPanel{ role.setType(ButtonType.LINK); role.setText("as Catalogue-" + org.getRole().toString().toLowerCase()); role.addStyleName("button-as-role-style"); - role.getElement().getStyle().setProperty("pointer-events", "none"); + role.getElement().getStyle().setProperty("pointerEvents", "none"); line.add(role); ListItem item = new ListItem(line); list.add(item); diff --git a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/GcubeCkanDataCatalogServiceImpl.java b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/GcubeCkanDataCatalogServiceImpl.java index 815b7ec..233e050 100644 --- a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/GcubeCkanDataCatalogServiceImpl.java +++ b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/GcubeCkanDataCatalogServiceImpl.java @@ -542,9 +542,12 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem try{ if(!SessionUtil.isIntoPortal()){ - enabled = true; - logger.warn("Enabling View per VRE in DEV mode"); - return "/organization_vre/" + scopePerCurrentUrl.substring(scopePerCurrentUrl.lastIndexOf("/")+1,scopePerCurrentUrl.length()).toLowerCase(); //is the VRE name + enabled = false; + 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 null; } GroupManager gm = new LiferayGroupManager(); diff --git a/src/main/resources/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/GCubeCkanDataCatalog.gwt.xml b/src/main/resources/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/GCubeCkanDataCatalog.gwt.xml index bf9468f..cda82dd 100644 --- a/src/main/resources/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/GCubeCkanDataCatalog.gwt.xml +++ b/src/main/resources/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/GCubeCkanDataCatalog.gwt.xml @@ -25,12 +25,13 @@ - + + + - + diff --git a/src/main/webapp/WEB-INF/jsp/GCubeCkanDataCatalogPortlet_view.jsp b/src/main/webapp/WEB-INF/jsp/GCubeCkanDataCatalogPortlet_view.jsp index bc03c11..9c144e8 100644 --- a/src/main/webapp/WEB-INF/jsp/GCubeCkanDataCatalogPortlet_view.jsp +++ b/src/main/webapp/WEB-INF/jsp/GCubeCkanDataCatalogPortlet_view.jsp @@ -26,8 +26,8 @@ - + +<%-- src='<%=request.getContextPath()%>/js/jquery.min.js'> --%> diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index ac4b197..f46f0c0 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -55,7 +55,7 @@ org.gcube.portlets_widgets.catalogue_sharing_widget.server.ShareServicesImpl - + ckanToZenodoServlet org.gcube.portlets.widgets.ckan2zenodopublisher.server.CkanToZenodoPublisherServiceImpl