diff --git a/geonode_mapstore_client/client/js/components/DetailsPanel/DetailsSettings.jsx b/geonode_mapstore_client/client/js/components/DetailsPanel/DetailsSettings.jsx index 1ce251b159..587066c770 100644 --- a/geonode_mapstore_client/client/js/components/DetailsPanel/DetailsSettings.jsx +++ b/geonode_mapstore_client/client/js/components/DetailsPanel/DetailsSettings.jsx @@ -1,7 +1,18 @@ -import React from 'react'; +import React, { forwardRef } from 'react'; import { Checkbox } from 'react-bootstrap'; import Message from '@mapstore/framework/components/I18N/Message'; import { RESOURCE_MANAGEMENT_PROPERTIES } from '@js/utils/ResourceUtils'; +import tooltip from '@mapstore/framework/components/misc/enhancers/tooltip'; + +const MessageTooltip = tooltip(forwardRef(({children, msgId, ...props}, ref) => { + return ( + + + {children} + + + ); +})); function DetailsSettings({ resource, onChange }) { const perms = resource?.perms || []; @@ -10,7 +21,7 @@ function DetailsSettings({ resource, onChange }) {
{Object.keys(RESOURCE_MANAGEMENT_PROPERTIES).map((key) => { - const { labelId, disabled } = RESOURCE_MANAGEMENT_PROPERTIES[key]; + const { labelId, disabled, tooltipId } = RESOURCE_MANAGEMENT_PROPERTIES[key]; return (
onChange({ [key]: !!event.target.checked })} > - +
); diff --git a/geonode_mapstore_client/client/js/utils/ResourceUtils.js b/geonode_mapstore_client/client/js/utils/ResourceUtils.js index 9c87305ecb..850228fc0f 100644 --- a/geonode_mapstore_client/client/js/utils/ResourceUtils.js +++ b/geonode_mapstore_client/client/js/utils/ResourceUtils.js @@ -55,22 +55,27 @@ export const GXP_PTYPES = { export const RESOURCE_MANAGEMENT_PROPERTIES = { 'metadata_uploaded_preserve': { labelId: 'gnviewer.preserveUploadedMetadata', + tooltipId: 'gnviewer.preserveUploadedMetadataTooltip', disabled: (perms = []) => !perms.includes('change_resourcebase') }, 'is_approved': { labelId: 'gnviewer.approveResource', + tooltipId: 'gnviewer.approveResourceTooltip', disabled: (perms = []) => !perms.includes('approve_resourcebase') }, 'is_published': { labelId: 'gnviewer.publishResource', + tooltipId: 'gnviewer.publishResourceTooltip', disabled: (perms = []) => !perms.includes('publish_resourcebase') }, 'featured': { labelId: 'gnviewer.featureResource', + tooltipId: 'gnviewer.featureResourceTooltip', disabled: (perms = []) => !perms.includes('feature_resourcebase') }, 'advertised': { labelId: 'gnviewer.advertiseResource', + tooltipId: 'gnviewer.advertiseResourceTooltip', disabled: (perms = []) => !perms.includes('change_resourcebase') } }; diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.de-DE.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.de-DE.json index 97ac49fe40..1333ec6d23 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.de-DE.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.de-DE.json @@ -415,11 +415,16 @@ "assets": "Assets", "settings": "Einstellungen", "resourceManagement": "Ressourcenverwaltung", - "preserveUploadedMetadata": "Behalte die hochgeladene ISO-Metadatendatei, anstatt sie zu generieren", - "approveResource": "Diese Ressource genehmigen (wird vom erweiterten Workflow verwendet)", - "publishResource": "Diese Ressource veröffentlichen (wird vom erweiterten Workflow verwendet)", - "featureResource": "Diese Ressource zu den vorgestellten Ressourcen hinzufügen", - "advertiseResource": "Diese Ressource durchsuchbar machen" + "preserveUploadedMetadata": "Hochgeladene Metadaten beibehalten", + "approveResource": "Genehmigt", + "publishResource": "Veröffentlicht", + "featureResource": "Hervorgehoben", + "advertiseResource": "Beworben", + "preserveUploadedMetadataTooltip": "Behalte die hochgeladene ISO-Metadatendatei, anstatt sie zu generieren", + "approveResourceTooltip": "Diese Ressource genehmigen (wird vom erweiterten Workflow verwendet)", + "publishResourceTooltip": "Diese Ressource veröffentlichen (wird vom erweiterten Workflow verwendet)", + "featureResourceTooltip": "Diese Ressource zu den vorgestellten Ressourcen hinzufügen", + "advertiseResourceTooltip": "Diese Ressource durchsuchbar machen" } } } diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.en-US.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.en-US.json index e9baa5f45d..6ef4d48d47 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.en-US.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.en-US.json @@ -415,11 +415,16 @@ "assets": "Assets", "settings": "Settings", "resourceManagement": "Resource management", - "preserveUploadedMetadata": "Keep the uploaded ISO metadata file instead of generating it", - "approveResource": "Approve this resource (used by the Advanced Workflow)", - "publishResource": "Publish this resource (used by the Advanced Workflow)", - "featureResource": "Add this resource to featured resources", - "advertiseResource": "Make this resource searchable" + "preserveUploadedMetadata": "Preserve uploaded metadata", + "approveResource": "Approved", + "publishResource": "Published", + "featureResource": "Featured", + "advertiseResource": "Advertised", + "preserveUploadedMetadataTooltip": "Keep the uploaded ISO metadata file instead of generating it", + "approveResourceTooltip": "Approve this resource (used by the Advanced Workflow)", + "publishResourceTooltip": "Publish this resource (used by the Advanced Workflow)", + "featureResourceTooltip": "Add this resource to featured resources", + "advertiseResourceTooltip": "Make this resource searchable" } } } diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.es-ES.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.es-ES.json index be97a3e6b0..ced281a966 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.es-ES.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.es-ES.json @@ -414,11 +414,16 @@ "assets": "Assets", "settings": "Configuracion", "resourceManagement": "Gestión de recursos", - "preserveUploadedMetadata": "Conservar el archivo de metadatos ISO cargado en lugar de generarlo", - "approveResource": "Aprobar este recurso (utilizado por el flujo de trabajo avanzado)", - "publishResource": "Publicar este recurso (utilizado por el flujo de trabajo avanzado)", - "featureResource": "Agregar este recurso a los recursos destacados", - "advertiseResource": "Hacer que este recurso sea buscable" + "preserveUploadedMetadata": "Conservar metadatos cargados", + "approveResource": "Aprobado", + "publishResource": "Publicado", + "featureResource": "Destacado", + "advertiseResource": "Anunciado", + "preserveUploadedMetadataTooltip": "Conservar el archivo de metadatos ISO cargado en lugar de generarlo", + "approveResourceTooltip": "Aprobar este recurso (utilizado por el flujo de trabajo avanzado)", + "publishResourceTooltip": "Publicar este recurso (utilizado por el flujo de trabajo avanzado)", + "featureResourceTooltip": "Agregar este recurso a los recursos destacados", + "advertiseResourceTooltip": "Hacer que este recurso sea buscable" } } } diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.fi-FI.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.fi-FI.json index d826b6853f..a5e28ac77e 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.fi-FI.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.fi-FI.json @@ -384,11 +384,16 @@ "assets": "Assets", "settings": "Settings", "resourceManagement": "Resource management", - "preserveUploadedMetadata": "Keep the uploaded ISO metadata file instead of generating it", - "approveResource": "Approve this resource (used by the Advanced Workflow)", - "publishResource": "Publish this resource (used by the Advanced Workflow)", - "featureResource": "Add this resource to featured resources", - "advertiseResource": "Make this resource searchable" + "preserveUploadedMetadata": "Preserve uploaded metadata", + "approveResource": "Approved", + "publishResource": "Published", + "featureResource": "Featured", + "advertiseResource": "Advertised", + "preserveUploadedMetadataTooltip": "Keep the uploaded ISO metadata file instead of generating it", + "approveResourceTooltip": "Approve this resource (used by the Advanced Workflow)", + "publishResourceTooltip": "Publish this resource (used by the Advanced Workflow)", + "featureResourceTooltip": "Add this resource to featured resources", + "advertiseResourceTooltip": "Make this resource searchable" } } } diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.fr-FR.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.fr-FR.json index c204669504..8a2095b04a 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.fr-FR.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.fr-FR.json @@ -415,11 +415,16 @@ "assets": "Assets", "settings": "Paramètres", "resourceManagement": "Gestion des ressources", - "preserveUploadedMetadata": "Conserver le fichier de métadonnées ISO téléchargé au lieu de le générer", - "approveResource": "Approuver cette ressource (utilisé par le flux de travail avancé)", - "publishResource": "Publier cette ressource (utilisé par le flux de travail avancé)", - "featureResource": "Ajouter cette ressource aux ressources en vedette", - "advertiseResource": "Rendre cette ressource consultable" + "preserveUploadedMetadata": "Conserver les métadonnées téléchargées", + "approveResource": "Approuvé", + "publishResource": "Publié", + "featureResource": "En vedette", + "advertiseResource": "Annoncé", + "preserveUploadedMetadataTooltip": "Conserver le fichier de métadonnées ISO téléchargé au lieu de le générer", + "approveResourceTooltip": "Approuver cette ressource (utilisé par le flux de travail avancé)", + "publishResourceTooltip": "Publier cette ressource (utilisé par le flux de travail avancé)", + "featureResourceTooltip": "Ajouter cette ressource aux ressources en vedette", + "advertiseResourceTooltip": "Rendre cette ressource consultable" } } } diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.hr-HR.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.hr-HR.json index 35adcd8198..32e9a781a8 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.hr-HR.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.hr-HR.json @@ -384,11 +384,16 @@ "assets": "Assets", "settings": "Settings", "resourceManagement": "Resource management", - "preserveUploadedMetadata": "Keep the uploaded ISO metadata file instead of generating it", - "approveResource": "Approve this resource (used by the Advanced Workflow)", - "publishResource": "Publish this resource (used by the Advanced Workflow)", - "featureResource": "Add this resource to featured resources", - "advertiseResource": "Make this resource searchable" + "preserveUploadedMetadata": "Preserve uploaded metadata", + "approveResource": "Approved", + "publishResource": "Published", + "featureResource": "Featured", + "advertiseResource": "Advertised", + "preserveUploadedMetadataTooltip": "Keep the uploaded ISO metadata file instead of generating it", + "approveResourceTooltip": "Approve this resource (used by the Advanced Workflow)", + "publishResourceTooltip": "Publish this resource (used by the Advanced Workflow)", + "featureResourceTooltip": "Add this resource to featured resources", + "advertiseResourceTooltip": "Make this resource searchable" } } } diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.it-IT.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.it-IT.json index c68bf45a82..e18aaeeff9 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.it-IT.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.it-IT.json @@ -417,11 +417,16 @@ "assets": "Assets", "settings": "Impostazioni", "resourceManagement": "Gestione della risorsa", - "preserveUploadedMetadata": "Conserva il file dei metadati ISO caricato invece di generarlo", - "approveResource": "Approva questa risorsa (utilizzata dall' Advanced Workflow)", - "publishResource": "Pubblica questa risorsa (utilizzata dall' Advanced Workflow)", - "featureResource": "Aggiungi questa risorsa alle risorse in evidenza", - "advertiseResource": "Rendi questa risorsa ricercabile" + "preserveUploadedMetadata": "Conserva i metadati caricati", + "approveResource": "Approvata", + "publishResource": "Pubblicata", + "featureResource": "In evidenza", + "advertiseResource": "Pubblicizzata", + "preserveUploadedMetadataTooltip": "Conserva il file dei metadati ISO caricato invece di generarlo", + "approveResourceTooltip": "Approva questa risorsa (utilizzata dall' Advanced Workflow)", + "publishResourceTooltip": "Pubblica questa risorsa (utilizzata dall' Advanced Workflow)", + "featureResourceTooltip": "Aggiungi questa risorsa alle risorse in evidenza", + "advertiseResourceTooltip": "Rendi questa risorsa ricercabile" } } } diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.nl-NL.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.nl-NL.json index 0f166981f4..2428b0edac 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.nl-NL.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.nl-NL.json @@ -384,11 +384,16 @@ "assets": "Assets", "settings": "Settings", "resourceManagement": "Resource management", - "preserveUploadedMetadata": "Keep the uploaded ISO metadata file instead of generating it", - "approveResource": "Approve this resource (used by the Advanced Workflow)", - "publishResource": "Publish this resource (used by the Advanced Workflow)", - "featureResource": "Add this resource to featured resources", - "advertiseResource": "Make this resource searchable" + "preserveUploadedMetadata": "Preserve uploaded metadata", + "approveResource": "Approved", + "publishResource": "Published", + "featureResource": "Featured", + "advertiseResource": "Advertised", + "preserveUploadedMetadataTooltip": "Keep the uploaded ISO metadata file instead of generating it", + "approveResourceTooltip": "Approve this resource (used by the Advanced Workflow)", + "publishResourceTooltip": "Publish this resource (used by the Advanced Workflow)", + "featureResourceTooltip": "Add this resource to featured resources", + "advertiseResourceTooltip": "Make this resource searchable" } } } diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.pt-PT.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.pt-PT.json index b8a0ca0fe8..d3c675dc97 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.pt-PT.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.pt-PT.json @@ -384,11 +384,16 @@ "assets": "Assets", "settings": "Settings", "resourceManagement": "Resource management", - "preserveUploadedMetadata": "Keep the uploaded ISO metadata file instead of generating it", - "approveResource": "Approve this resource (used by the Advanced Workflow)", - "publishResource": "Publish this resource (used by the Advanced Workflow)", - "featureResource": "Add this resource to featured resources", - "advertiseResource": "Make this resource searchable" + "preserveUploadedMetadata": "Preserve uploaded metadata", + "approveResource": "Approved", + "publishResource": "Published", + "featureResource": "Featured", + "advertiseResource": "Advertised", + "preserveUploadedMetadataTooltip": "Keep the uploaded ISO metadata file instead of generating it", + "approveResourceTooltip": "Approve this resource (used by the Advanced Workflow)", + "publishResourceTooltip": "Publish this resource (used by the Advanced Workflow)", + "featureResourceTooltip": "Add this resource to featured resources", + "advertiseResourceTooltip": "Make this resource searchable" } } } diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.sk-SK.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.sk-SK.json index 1bd5c757ba..f488e40187 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.sk-SK.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.sk-SK.json @@ -384,11 +384,16 @@ "assets": "Assets", "settings": "Settings", "resourceManagement": "Resource management", - "preserveUploadedMetadata": "Keep the uploaded ISO metadata file instead of generating it", - "approveResource": "Approve this resource (used by the Advanced Workflow)", - "publishResource": "Publish this resource (used by the Advanced Workflow)", - "featureResource": "Add this resource to featured resources", - "advertiseResource": "Make this resource searchable" + "preserveUploadedMetadata": "Preserve uploaded metadata", + "approveResource": "Approved", + "publishResource": "Published", + "featureResource": "Featured", + "advertiseResource": "Advertised", + "preserveUploadedMetadataTooltip": "Keep the uploaded ISO metadata file instead of generating it", + "approveResourceTooltip": "Approve this resource (used by the Advanced Workflow)", + "publishResourceTooltip": "Publish this resource (used by the Advanced Workflow)", + "featureResourceTooltip": "Add this resource to featured resources", + "advertiseResourceTooltip": "Make this resource searchable" } } } diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.sv-SE.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.sv-SE.json index 201f7f9c38..53439fd8f6 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.sv-SE.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.sv-SE.json @@ -385,11 +385,16 @@ "assets": "Assets", "settings": "Settings", "resourceManagement": "Resource management", - "preserveUploadedMetadata": "Keep the uploaded ISO metadata file instead of generating it", - "approveResource": "Approve this resource (used by the Advanced Workflow)", - "publishResource": "Publish this resource (used by the Advanced Workflow)", - "featureResource": "Add this resource to featured resources", - "advertiseResource": "Make this resource searchable" + "preserveUploadedMetadata": "Preserve uploaded metadata", + "approveResource": "Approved", + "publishResource": "Published", + "featureResource": "Featured", + "advertiseResource": "Advertised", + "preserveUploadedMetadataTooltip": "Keep the uploaded ISO metadata file instead of generating it", + "approveResourceTooltip": "Approve this resource (used by the Advanced Workflow)", + "publishResourceTooltip": "Publish this resource (used by the Advanced Workflow)", + "featureResourceTooltip": "Add this resource to featured resources", + "advertiseResourceTooltip": "Make this resource searchable" } } } diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.vi-VN.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.vi-VN.json index 0eb3e8d404..0955406f0e 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.vi-VN.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.vi-VN.json @@ -384,11 +384,16 @@ "assets": "Assets", "settings": "Settings", "resourceManagement": "Resource management", - "preserveUploadedMetadata": "Keep the uploaded ISO metadata file instead of generating it", - "approveResource": "Approve this resource (used by the Advanced Workflow)", - "publishResource": "Publish this resource (used by the Advanced Workflow)", - "featureResource": "Add this resource to featured resources", - "advertiseResource": "Make this resource searchable" + "preserveUploadedMetadata": "Preserve uploaded metadata", + "approveResource": "Approved", + "publishResource": "Published", + "featureResource": "Featured", + "advertiseResource": "Advertised", + "preserveUploadedMetadataTooltip": "Keep the uploaded ISO metadata file instead of generating it", + "approveResourceTooltip": "Approve this resource (used by the Advanced Workflow)", + "publishResourceTooltip": "Publish this resource (used by the Advanced Workflow)", + "featureResourceTooltip": "Add this resource to featured resources", + "advertiseResourceTooltip": "Make this resource searchable" } } } diff --git a/geonode_mapstore_client/static/mapstore/gn-translations/data.zh-ZH.json b/geonode_mapstore_client/static/mapstore/gn-translations/data.zh-ZH.json index 7a0092ba52..b5a0ff6889 100644 --- a/geonode_mapstore_client/static/mapstore/gn-translations/data.zh-ZH.json +++ b/geonode_mapstore_client/static/mapstore/gn-translations/data.zh-ZH.json @@ -384,11 +384,16 @@ "assets": "Assets", "settings": "Settings", "resourceManagement": "Resource management", - "preserveUploadedMetadata": "Keep the uploaded ISO metadata file instead of generating it", - "approveResource": "Approve this resource (used by the Advanced Workflow)", - "publishResource": "Publish this resource (used by the Advanced Workflow)", - "featureResource": "Add this resource to featured resources", - "advertiseResource": "Make this resource searchable" + "preserveUploadedMetadata": "Preserve uploaded metadata", + "approveResource": "Approved", + "publishResource": "Published", + "featureResource": "Featured", + "advertiseResource": "Advertised", + "preserveUploadedMetadataTooltip": "Keep the uploaded ISO metadata file instead of generating it", + "approveResourceTooltip": "Approve this resource (used by the Advanced Workflow)", + "publishResourceTooltip": "Publish this resource (used by the Advanced Workflow)", + "featureResourceTooltip": "Add this resource to featured resources", + "advertiseResourceTooltip": "Make this resource searchable" } } }