merged with updates implemented into #19988
This commit is contained in:
parent
0a1390ae3f
commit
3505843ca0
|
@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
#### Enhancements
|
||||
|
||||
[#20650] Data Catalogue: integrate the Content Moderator System
|
||||
[#19988] Integrated with `checkEnvironment` to show or not the "Upload to Zenodo" facility
|
||||
|
||||
## [v2.0.1] - 2021-05-04
|
||||
|
||||
|
|
|
@ -407,6 +407,15 @@ public class CkanMetadataManagementPanel extends FlowPanel {
|
|||
public void enablePublishOnZenodoButton(boolean value) {
|
||||
uploadToZenodo.setEnabled(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Visibility publish on zenodo button.
|
||||
*
|
||||
* @param value the value
|
||||
*/
|
||||
public void visibilityPublishOnZenodoButton(boolean value) {
|
||||
uploadToZenodo.setVisible(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show only home/statistics buttons.
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.resource.CkanPor
|
|||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
|
||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductResponse;
|
||||
import org.gcube.portlets.widgets.ckan2zenodopublisher.client.CkanToZenodoPublisherServiceAsync;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.logical.shared.ResizeEvent;
|
||||
|
@ -275,6 +276,23 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
|||
// listen for DOM messages
|
||||
listenForPostMessage();
|
||||
|
||||
|
||||
CkanToZenodoPublisherServiceAsync.Util.getInstance().checkZenodoEnvironment(new AsyncCallback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
managementPanel.visibilityPublishOnZenodoButton(false);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Boolean result) {
|
||||
GWT.log("checkZenodoEnvironment result: "+result);
|
||||
managementPanel.visibilityPublishOnZenodoButton(result);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue