diff --git a/geonode_mapstore_client/client/js/epics/gnsave.js b/geonode_mapstore_client/client/js/epics/gnsave.js index 114bb1f365..daee701f1b 100644 --- a/geonode_mapstore_client/client/js/epics/gnsave.js +++ b/geonode_mapstore_client/client/js/epics/gnsave.js @@ -81,7 +81,8 @@ import { ResourceTypes, cleanCompactPermissions, toGeoNodeMapConfig, - RESOURCE_MANAGEMENT_PROPERTIES, + RESOURCE_PUBLISHING_PROPERTIES, + RESOURCE_OPTIONS_PROPERTIES, getDimensions, isDefaultDatasetSubtype } from '@js/utils/ResourceUtils'; @@ -94,7 +95,7 @@ import { layersSelector, getSelectedLayer as getSelectedNode } from '@mapstore/f import { styleServiceSelector, getUpdatedLayer, selectedStyleSelector } from '@mapstore/framework/selectors/styleeditor'; import LayersAPI from '@mapstore/framework/api/geoserver/Layers'; -const RESOURCE_MANAGEMENT_PROPERTIES_KEYS = Object.keys(RESOURCE_MANAGEMENT_PROPERTIES); +const RESOURCE_MANAGEMENT_PROPERTIES_KEYS = Object.keys({...RESOURCE_PUBLISHING_PROPERTIES, ...RESOURCE_OPTIONS_PROPERTIES}); function parseMapBody(body) { const geoNodeMap = toGeoNodeMapConfig(body.data); diff --git a/geonode_mapstore_client/client/js/plugins/ResourceDetails/ResourceDetails.jsx b/geonode_mapstore_client/client/js/plugins/ResourceDetails/ResourceDetails.jsx index 455acd76f0..c6fd5c8fe5 100644 --- a/geonode_mapstore_client/client/js/plugins/ResourceDetails/ResourceDetails.jsx +++ b/geonode_mapstore_client/client/js/plugins/ResourceDetails/ResourceDetails.jsx @@ -9,28 +9,35 @@ import React, { useEffect, useState } from 'react'; import { createPlugin } from '@mapstore/framework/utils/PluginsUtils'; import { connect } from 'react-redux'; -import { createStructuredSelector } from 'reselect'; +import { createStructuredSelector, createSelector } from 'reselect'; import PropTypes from 'prop-types'; -import { requestResource, setResource } from '@js/actions/gnresource'; + import controls from '@mapstore/framework/reducers/controls'; import config from '@mapstore/framework/reducers/config'; -import gnresource from '@js/reducers/gnresource'; -import { - getResourceData, - getResourceLoading, - getResourceDirtyState, - canEditPermissions -} from '@js/selectors/resource'; import usePluginItems from '@mapstore/framework/hooks/usePluginItems'; -import tabComponents from './containers/tabComponents'; +import { mapInfoSelector } from '@mapstore/framework/selectors/map'; import ResourcesPanelWrapper from '@mapstore/framework/plugins/ResourcesCatalog/components/ResourcesPanelWrapper'; import TargetSelectorPortal from '@mapstore/framework/plugins/ResourcesCatalog/components/TargetSelectorPortal'; import useResourcePanelWrapper from '@mapstore/framework/plugins/ResourcesCatalog/hooks/useResourcePanelWrapper'; import { getShowDetails } from '@mapstore/framework/plugins/ResourcesCatalog/selectors/resources'; -import { setShowDetails, setSelectedResource } from '@mapstore/framework/plugins/ResourcesCatalog/actions/resources'; +import { setShowDetails, setSelectedResource, setDetailPanelTab } from '@mapstore/framework/plugins/ResourcesCatalog/actions/resources'; import PendingStatePrompt from '@mapstore/framework/plugins/ResourcesCatalog/containers/PendingStatePrompt'; -import DetailsPanel from './containers/DetailsPanel'; +import Button from '@mapstore/framework/components/layout/Button'; +import Message from '@mapstore/framework/components/I18N/Message'; + +import { + getResourceData, + getResourceLoading, + getResourceDirtyState, + canEditPermissions, + isNewResource, + getResourceId +} from '@js/selectors/resource'; +import { requestResource, setResource } from '@js/actions/gnresource'; +import gnresource from '@js/reducers/gnresource'; import useDetectClickOut from '@js/hooks/useDetectClickOut'; +import tabComponents from '@js/plugins/ResourceDetails/containers/tabComponents'; +import DetailsPanel from '@js/plugins/ResourceDetails/containers/DetailsPanel'; /** * @module ResourceDetails @@ -215,7 +222,7 @@ function ResourceDetailsPanel({ "items": "{({extent: context.get(state('gnResourceData'), 'extent')})}" }, { - "type": "linked-resources", + "type": "relations", "id": "related", "labelId": "gnviewer.linkedResources.label", "items": "{context.get(state('gnResourceData'), 'linkedResources')}" @@ -234,11 +241,18 @@ function ResourceDetailsPanel({ "disableIf": "{context.get(state('gnResourceData'), 'resource_type') !== 'dataset'}", "items": "{context.get(state('gnResourceData'), 'attribute_set')}" }, + { + "type": "share", + "id": "share", + "labelId": "gnviewer.share", + "disableIf": "{!context.canAccessPermissions(state('gnResourceData'))}", + "items": [true] + }, { "type": "settings", "id": "settings", - "labelId": "gnviewer.management", - "disableIf": "{!context.canManageResourceSettings(state('gnResourceData')) && !context.canAccessPermissions(state('gnResourceData'))}", + "labelId": "gnviewer.settings", + "disableIf": "{!context.canManageResourceSettings(state('gnResourceData'))}", "items": [true] } ], @@ -389,7 +403,7 @@ const ResourceDetailsPlugin = connect( export default createPlugin('ResourceDetails', { component: ResourceDetailsPlugin, containers: { - ActionNavbar: { + ActionNavbar: [{ name: 'ResourceDetailsButton', Component: connect((state) => ({resource: getResourceData(state)}), { onShow: setShowDetails })(({ component, resourcesGridId, onShow, resource }) => { if (!resource?.pk) return null; @@ -409,7 +423,37 @@ export default createPlugin('ResourceDetails', { }), priority: 1, doNotHide: true - }, + }, { + name: 'ShareActionButton', + Component: connect( + createSelector( + isNewResource, + getResourceId, + mapInfoSelector, + (isNew, resourceId, mapInfo) => ({ + enabled: !isNew && (resourceId || mapInfo?.id) + }) + ), + { + onSelectTab: setDetailPanelTab, + onShowDetails: setShowDetails + } + )(({ enabled, size, onSelectTab, onShowDetails }) => { + return enabled + ? { + onShowDetails(true); + onSelectTab('share'); + }} + > + + + : null; + }), + priority: 1, + doNotHide: true + }], ResourcesGrid: { priority: 2, target: 'card-buttons', diff --git a/geonode_mapstore_client/client/js/plugins/ResourceDetails/components/DetailsLinkedResources.jsx b/geonode_mapstore_client/client/js/plugins/ResourceDetails/components/DetailsLinkedResources.jsx index 33a5ab088c..f252590bb6 100644 --- a/geonode_mapstore_client/client/js/plugins/ResourceDetails/components/DetailsLinkedResources.jsx +++ b/geonode_mapstore_client/client/js/plugins/ResourceDetails/components/DetailsLinkedResources.jsx @@ -61,7 +61,7 @@ const DetailsLinkedResources = ({ fields }) => { ]; return ( - + {linkedResources.map(({resources, type})=> )} ); diff --git a/geonode_mapstore_client/client/js/plugins/ResourceDetails/components/DetailsSettings.jsx b/geonode_mapstore_client/client/js/plugins/ResourceDetails/components/DetailsSettings.jsx index ac246f9d7c..d02900eaf1 100644 --- a/geonode_mapstore_client/client/js/plugins/ResourceDetails/components/DetailsSettings.jsx +++ b/geonode_mapstore_client/client/js/plugins/ResourceDetails/components/DetailsSettings.jsx @@ -7,7 +7,7 @@ import FlexBox from '@mapstore/framework/components/layout/FlexBox'; import Text from '@mapstore/framework/components/layout/Text'; import SelectInfiniteScroll from '@mapstore/framework/plugins/ResourcesCatalog/components/SelectInfiniteScroll'; import { getGroups } from '@js/api/geonode/v2'; -import { canManageResourceSettings, RESOURCE_MANAGEMENT_PROPERTIES } from '@js/utils/ResourceUtils'; +import { canManageResourcePublishing, canManageResourceOptions, RESOURCE_PUBLISHING_PROPERTIES, RESOURCE_OPTIONS_PROPERTIES } from '@js/utils/ResourceUtils'; const MessageTooltip = tooltip(forwardRef(({children, msgId, ...props}, ref) => { return ( @@ -46,13 +46,35 @@ function DetailsSettings({ resource, onChange }) { /> - {canManageResourceSettings(resource) && ( + {canManageResourcePublishing(resource) && ( - + - {Object.keys(RESOURCE_MANAGEMENT_PROPERTIES).map((key) => { - const { labelId, disabled, tooltipId } = RESOURCE_MANAGEMENT_PROPERTIES[key]; + {Object.keys(RESOURCE_PUBLISHING_PROPERTIES).map((key) => { + const { labelId, disabled, tooltipId } = RESOURCE_PUBLISHING_PROPERTIES[key]; + return ( + + onChange({ [key]: !!event.target.checked })} + > + + + + ); + })} + + )} + {canManageResourceOptions(resource) && ( + + + + + {Object.keys(RESOURCE_OPTIONS_PROPERTIES).map((key) => { + const { labelId, disabled, tooltipId } = RESOURCE_OPTIONS_PROPERTIES[key]; return ( + diff --git a/geonode_mapstore_client/client/js/plugins/Share/components/Permissions/GeoLimits.jsx b/geonode_mapstore_client/client/js/plugins/ResourceDetails/components/GeoLimits.jsx similarity index 100% rename from geonode_mapstore_client/client/js/plugins/Share/components/Permissions/GeoLimits.jsx rename to geonode_mapstore_client/client/js/plugins/ResourceDetails/components/GeoLimits.jsx diff --git a/geonode_mapstore_client/client/js/plugins/ResourceDetails/containers/tabComponents.js b/geonode_mapstore_client/client/js/plugins/ResourceDetails/containers/tabComponents.js index 90e398a1d8..d0b3d7d21b 100644 --- a/geonode_mapstore_client/client/js/plugins/ResourceDetails/containers/tabComponents.js +++ b/geonode_mapstore_client/client/js/plugins/ResourceDetails/containers/tabComponents.js @@ -12,14 +12,16 @@ import DetailsAssets from '../components/DetailsAssets'; import DetailsData from '../components/DetailsData'; import DetailsLinkedResources from '../components/DetailsLinkedResources'; import DetailsSettings from '../components/DetailsSettings'; +import DetailsShare from '../components/DetailsShare'; import { setResourceExtent, updateResourceProperties } from '@js/actions/gnresource'; import { show } from '@mapstore/framework/actions/notifications'; const tabComponents = { 'locations': connect(() => ({}), { onSetExtent: setResourceExtent })(DetailsLocations), - 'linked-resources': DetailsLinkedResources, + 'relations': DetailsLinkedResources, 'assets': connect(() => ({}), { onNotify: show, onChange: updateResourceProperties })(DetailsAssets), 'data': connect(() => ({}), { onChange: updateResourceProperties })(DetailsData), + 'share': DetailsShare, 'settings': connect(() => ({}), { onChange: updateResourceProperties })(DetailsSettings) }; diff --git a/geonode_mapstore_client/client/js/plugins/Share/Share.jsx b/geonode_mapstore_client/client/js/plugins/Share/Share.jsx deleted file mode 100644 index e998f2b3d3..0000000000 --- a/geonode_mapstore_client/client/js/plugins/Share/Share.jsx +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2020, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; -import { createSelector } from 'reselect'; -import { Glyphicon } from 'react-bootstrap'; - -import { createPlugin } from '@mapstore/framework/utils/PluginsUtils'; -import { setControlProperty } from '@mapstore/framework/actions/controls'; -import Message from '@mapstore/framework/components/I18N/Message'; -import controls from '@mapstore/framework/reducers/controls'; -import Button from '@mapstore/framework/components/layout/Button'; -import { mapInfoSelector } from '@mapstore/framework/selectors/map'; - -import OverlayContainer from '@js/components/OverlayContainer'; -import { - isNewResource, - getResourceId, - getResourceData, - getViewedResourceType -} from '@js/selectors/resource'; -import { - canAccessPermissions, - getDownloadUrlInfo, - getResourceTypesInfo -} from '@js/utils/ResourceUtils'; -import SharePageLink from '@js/plugins/Share/SharePageLink'; -import ShareEmbedLink from '@js/plugins/Share/ShareEmbedLink'; -import Permissions from '@js/plugins/Share/components/Permissions'; -import FlexBox from '@mapstore/framework/components/layout/FlexBox'; - -const getEmbedUrl = (resource) => { - const { formatEmbedUrl = (_resource) => _resource?.embed_url } = getResourceTypesInfo()[resource?.resource_type] || {}; - return formatEmbedUrl(resource) ? resource?.embed_url : null; -}; -function Share({ - enabled, - onClose, - resource, - resourceType -}) { - const embedUrl = getEmbedUrl(resource); - const downloadUrl = getDownloadUrlInfo(resource)?.url; - return ( - - - - - onClose()}> - - - - - {canAccessPermissions(resource) && } - {(resourceType === 'document' && !!downloadUrl) && } collapsible={false} />} - {embedUrl && } />} - - - - ); -} - -Share.propTypes = { - resourceId: PropTypes.oneOfType([ PropTypes.number, PropTypes.string ]), - enabled: PropTypes.bool, - onClose: PropTypes.func -}; - -Share.defaultProps = { - resourceId: null, - enabled: false, - onClose: () => {} -}; - -const SharePlugin = connect( - createSelector([ - state => state?.controls?.rightOverlay?.enabled === 'Share', - getResourceData, - getViewedResourceType - ], (enabled, resource, type) => ({ - enabled, - resource, - resourceType: type - })), - { - onClose: setControlProperty.bind(null, 'rightOverlay', 'enabled', false) - } -)(Share); - -function ShareButton({ - enabled, - variant, - onClick, - size -}) { - return enabled - ? onClick()} - > - - - : null - ; -} - -const ConnectedShareButton = connect( - createSelector( - isNewResource, - getResourceId, - mapInfoSelector, - (isNew, resourceId, mapInfo) => ({ - enabled: !isNew && (resourceId || mapInfo?.id) - }) - ), - { - onClick: setControlProperty.bind(null, 'rightOverlay', 'enabled', 'Share') - } -)((ShareButton)); - -export default createPlugin('Share', { - component: SharePlugin, - containers: { - ActionNavbar: { - name: 'Share', - Component: ConnectedShareButton - } - }, - epics: {}, - reducers: { - controls - } -}); diff --git a/geonode_mapstore_client/client/js/plugins/Share/ShareEmbedLink.jsx b/geonode_mapstore_client/client/js/plugins/Share/ShareEmbedLink.jsx deleted file mode 100644 index 05c27cace3..0000000000 --- a/geonode_mapstore_client/client/js/plugins/Share/ShareEmbedLink.jsx +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2024, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ -import React, { useState } from 'react'; -import { Checkbox } from 'react-bootstrap'; -import SharePageLink from './SharePageLink'; -import Message from '@mapstore/framework/components/I18N/Message'; - -function ShareEmbedLink({ - embedUrl, - label -}) { - const [includeFullscreen, setIncludeFullscreen] = useState(false); - const getEmbedSnippet = () => { - return [ - '' - ].filter(value => value).join(' '); - }; - return ( - - setIncludeFullscreen(!!event.target.checked )}> - - - - ); -} - -export default ShareEmbedLink; diff --git a/geonode_mapstore_client/client/js/plugins/Share/SharePageLink.jsx b/geonode_mapstore_client/client/js/plugins/Share/SharePageLink.jsx deleted file mode 100644 index 4444c5ae52..0000000000 --- a/geonode_mapstore_client/client/js/plugins/Share/SharePageLink.jsx +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2021, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -import React, { useState, useEffect } from 'react'; -import { Glyphicon } from 'react-bootstrap'; - -import Button from '@mapstore/framework/components/layout/Button'; -import CopyToClipboard from 'react-copy-to-clipboard'; -import FlexBox from '@mapstore/framework/components/layout/FlexBox'; - - -function SharePageLink({label, value, collapsible = true, children}) { - const [copied, setCopied] = useState(false); - const [isExpanded, setIsExpanded] = useState(false); - - useEffect(() => { - if (copied) { - setTimeout(() => { - setCopied(false); - }, 1000); - } - }, [copied]); - - return ( - - - - setIsExpanded(!isExpanded), - style: { cursor: 'pointer' } - })} - > - {label} - {collapsible && } - - {(!collapsible || isExpanded) && ( - - - - {!copied && - setCopied(true)} - > - - - } - {copied && } - - {children} - - )} - - - - ); -} - -export default SharePageLink; diff --git a/geonode_mapstore_client/client/js/plugins/Share/index.jsx b/geonode_mapstore_client/client/js/plugins/Share/index.jsx deleted file mode 100644 index 7087d7ffab..0000000000 --- a/geonode_mapstore_client/client/js/plugins/Share/index.jsx +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright 2025, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -export { default } from './Share'; diff --git a/geonode_mapstore_client/client/js/plugins/__tests__/share-test.jsx b/geonode_mapstore_client/client/js/plugins/__tests__/share-test.jsx deleted file mode 100644 index 9903a62ed6..0000000000 --- a/geonode_mapstore_client/client/js/plugins/__tests__/share-test.jsx +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2021, GeoSolutions Sas. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -import expect from 'expect'; -import React from 'react'; -import ReactDOM from 'react-dom'; -import { getPluginForTest } from '@mapstore/framework/plugins/__tests__/pluginsTestUtils'; -import gnresource from '../../reducers/gnresource'; -import Share from '../Share'; - - -describe('Share Plugin', () => { - beforeEach((done) => { - document.body.innerHTML = ''; - window.__DEVTOOLS__ = true; - setTimeout(done); - }); - - afterEach((done) => { - ReactDOM.unmountComponentAtNode(document.getElementById('container')); - document.body.innerHTML = ''; - window.__DEVTOOLS__ = undefined; - setTimeout(done); - }); - - const testState = { - gnresource: { - type: "testType" - }, - controls: { - rightOverlay: { - enabled: 'Share' - } - } - }; - - it('render Share plugin', () => { - const {Plugin, store} = getPluginForTest(Share, testState, null, [], { gnresource }); - ReactDOM.render(, document.getElementById('container')); - const container = document.querySelector('.gn-share-panel'); - expect(container).toBeTruthy(); - const state = store.getState().gnresource; - expect(state.type).toBe('testType'); - }); -}); diff --git a/geonode_mapstore_client/client/js/plugins/index.js b/geonode_mapstore_client/client/js/plugins/index.js index ed90bc549b..85e13b2617 100644 --- a/geonode_mapstore_client/client/js/plugins/index.js +++ b/geonode_mapstore_client/client/js/plugins/index.js @@ -242,10 +242,6 @@ export const plugins = { 'Search', () => import(/* webpackChunkName: 'plugins/search-plugin' */ '@mapstore/framework/plugins/Search') ), - SharePlugin: toModulePlugin( - 'Share', - () => import(/* webpackChunkName: 'plugins/share-plugin' */ '@js/plugins/Share') - ), IdentifyPlugin: toModulePlugin( 'Identify', () => import(/* webpackChunkName: 'plugins/identify-plugin' */ '@mapstore/framework/plugins/Identify') diff --git a/geonode_mapstore_client/client/js/selectors/resource.js b/geonode_mapstore_client/client/js/selectors/resource.js index 9b9d62d6a0..6ac50c1c6d 100644 --- a/geonode_mapstore_client/client/js/selectors/resource.js +++ b/geonode_mapstore_client/client/js/selectors/resource.js @@ -12,7 +12,7 @@ import { compareMapChanges } from '@mapstore/framework/utils/MapUtils'; import { currentStorySelector } from '@mapstore/framework/selectors/geostory'; import { originalDataSelector } from '@mapstore/framework/selectors/dashboard'; import { widgetsConfig } from '@mapstore/framework/selectors/widgets'; -import { ResourceTypes, RESOURCE_MANAGEMENT_PROPERTIES, resourceToLayerConfig } from '@js/utils/ResourceUtils'; +import { ResourceTypes, RESOURCE_PUBLISHING_PROPERTIES, RESOURCE_OPTIONS_PROPERTIES, resourceToLayerConfig } from '@js/utils/ResourceUtils'; import { getCurrentResourceDeleteLoading, getCurrentResourceCopyLoading @@ -30,7 +30,7 @@ import { generateContextResource } from '@mapstore/framework/selectors/contextcr import { layerSettingSelector, getSelectedLayer as getSelectedNode } from '@mapstore/framework/selectors/layers'; import { saveLayer } from '@mapstore/framework/utils/LayersUtils'; -const RESOURCE_MANAGEMENT_PROPERTIES_KEYS = Object.keys(RESOURCE_MANAGEMENT_PROPERTIES); +const RESOURCE_MANAGEMENT_PROPERTIES_KEYS = Object.keys({...RESOURCE_PUBLISHING_PROPERTIES, ...RESOURCE_OPTIONS_PROPERTIES}); /** * @module selectors/resource diff --git a/geonode_mapstore_client/client/js/utils/ResourceUtils.js b/geonode_mapstore_client/client/js/utils/ResourceUtils.js index 8b077e7d6a..ad72eda448 100644 --- a/geonode_mapstore_client/client/js/utils/ResourceUtils.js +++ b/geonode_mapstore_client/client/js/utils/ResourceUtils.js @@ -52,17 +52,7 @@ export const GXP_PTYPES = { 'GN_WMS': 'gxp_geonodecataloguesource' }; -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') - }, +export const RESOURCE_PUBLISHING_PROPERTIES = { 'is_published': { labelId: 'gnviewer.publishResource', tooltipId: 'gnviewer.publishResourceTooltip', @@ -80,6 +70,18 @@ export const RESOURCE_MANAGEMENT_PROPERTIES = { } }; +export const RESOURCE_OPTIONS_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') + } +}; export const TIME_SERIES_PROPERTIES = ['attribute', 'end_attribute', 'presentation', 'precision_value', 'precision_step']; export const TIME_ATTRIBUTE_TYPES = ['xsd:date', 'xsd:dateTime', 'xsd:date-time', 'xsd:time']; @@ -876,12 +878,22 @@ export const resourceToLayers = (resource) => { return []; }; -export const canManageResourceSettings = (resource) => { +export const canManageResourcePublishing = (resource) => { const { perms } = resource || {}; - const settingsPerms = ['feature_resourcebase', 'approve_resourcebase', 'publish_resourcebase']; + const settingsPerms = ['feature_resourcebase', 'change_resourcebase', 'publish_resourcebase']; return !!(perms || []).find(perm => settingsPerms.includes(perm)); }; +export const canManageResourceOptions = (resource) => { + const { perms } = resource || {}; + const settingsPerms = ['change_resourcebase', 'approve_resourcebase']; + return !!(perms || []).find(perm => settingsPerms.includes(perm)); +}; + +export const canManageResourceSettings = (resource) => { + return !!(canManageResourcePublishing(resource) || canManageResourceOptions(resource)); +}; + export const canAccessPermissions = (resource) => { const { perms } = resource || {}; return perms?.includes('change_resourcebase_permissions'); diff --git a/geonode_mapstore_client/client/js/utils/__tests__/ResourceUtils-test.js b/geonode_mapstore_client/client/js/utils/__tests__/ResourceUtils-test.js index 0c196fba42..9ef50cc175 100644 --- a/geonode_mapstore_client/client/js/utils/__tests__/ResourceUtils-test.js +++ b/geonode_mapstore_client/client/js/utils/__tests__/ResourceUtils-test.js @@ -33,6 +33,8 @@ import { getResourceWithLinkedResources, getResourceAdditionalProperties, getDimensions, + canManageResourcePublishing, + canManageResourceOptions, canManageResourceSettings, canAccessPermissions, formatResourceLinkUrl @@ -1009,9 +1011,61 @@ describe('Test Resource Utils', () => { }]); }); }); + it('canManageResourcePublishing', () => { + expect(canManageResourcePublishing({ perms: ['publish_resourcebase'] })).toBeTruthy(); + + expect(canManageResourcePublishing({ perms: ['feature_resourcebase'] })).toBeTruthy(); + + expect(canManageResourcePublishing({ perms: ['change_resourcebase'] })).toBeTruthy(); + + expect(canManageResourcePublishing({ perms: ['publish_resourcebase', 'feature_resourcebase', 'change_resourcebase'] })).toBeTruthy(); + + expect(canManageResourcePublishing({ perms: ['view_resourcebase', 'publish_resourcebase', 'download_resourcebase'] })).toBeTruthy(); + + expect(canManageResourcePublishing({ perms: ['view_resourcebase'] })).toBeFalsy(); + + expect(canManageResourcePublishing({ perms: [] })).toBeFalsy(); + + expect(canManageResourcePublishing({})).toBeFalsy(); + + expect(canManageResourcePublishing(undefined)).toBeFalsy(); + + expect(canManageResourcePublishing(null)).toBeFalsy(); + }); + it('canManageResourceOptions', () => { + expect(canManageResourceOptions({ perms: ['change_resourcebase'] })).toBeTruthy(); + + expect(canManageResourceOptions({ perms: ['approve_resourcebase'] })).toBeTruthy(); + + expect(canManageResourceOptions({ perms: ['change_resourcebase', 'approve_resourcebase'] })).toBeTruthy(); + + expect(canManageResourceOptions({ perms: ['view_resourcebase', 'change_resourcebase', 'download_resourcebase'] })).toBeTruthy(); + + expect(canManageResourceOptions({ perms: ['view_resourcebase'] })).toBeFalsy(); + + expect(canManageResourceOptions({ perms: ['publish_resourcebase', 'feature_resourcebase'] })).toBeFalsy(); + + expect(canManageResourceOptions({ perms: [] })).toBeFalsy(); + + expect(canManageResourceOptions({})).toBeFalsy(); + + expect(canManageResourceOptions(undefined)).toBeFalsy(); + + expect(canManageResourceOptions(null)).toBeFalsy(); + }); it('canManageResourceSettings', () => { - expect(canManageResourceSettings({ perms: ['approve_resourcebase'] })).toBeTruthy(); + expect(canManageResourceSettings({ perms: ['change_resourcebase'] })).toBeTruthy(); + expect(canManageResourceSettings({ perms: ['change_resourcebase', 'view_resourcebase'] })).toBeTruthy(); + expect(canManageResourceSettings({ perms: ['approve_resourcebase', 'publish_resourcebase'] })).toBeTruthy(); + expect(canManageResourceSettings({ perms: ['approve_resourcebase', 'feature_resourcebase'] })).toBeTruthy(); + expect(canManageResourceSettings({ perms: ['approve_resourcebase', 'change_resourcebase'] })).toBeTruthy(); + expect(canManageResourceSettings({ perms: ['publish_resourcebase', 'change_resourcebase'] })).toBeTruthy(); + expect(canManageResourceSettings({ perms: ['view_resourcebase'] })).toBeFalsy(); + expect(canManageResourceSettings({ perms: [] })).toBeFalsy(); + expect(canManageResourceSettings({})).toBeFalsy(); + expect(canManageResourceSettings(undefined)).toBeFalsy(); + expect(canManageResourceSettings(null)).toBeFalsy(); }); it('canAccessPermissions', () => { expect(canAccessPermissions({ perms: ['change_resourcebase_permissions'] })).toBeTruthy(); diff --git a/geonode_mapstore_client/client/themes/geonode/less/_share.less b/geonode_mapstore_client/client/themes/geonode/less/_share.less index 2bc6031d96..2bb788b294 100644 --- a/geonode_mapstore_client/client/themes/geonode/less/_share.less +++ b/geonode_mapstore_client/client/themes/geonode/less/_share.less @@ -3,22 +3,10 @@ // ************** #ms-components-theme(@theme-vars) { - .gn-share-panel { - .color-var(@theme-vars[main-color]); - .background-color-var(@theme-vars[main-bg]); - } .gn-geo-limits { .color-var(@theme-vars[main-color]); .background-color-var(@theme-vars[main-bg]); } - .gn-share-content, - .gn-share-title-header { - &.collapsible { - .color-var(@theme-vars[main-color]); - .background-color-var(@theme-vars[main-bg]); - .border-color-var(@theme-vars[main-border-color]); - } - } .gn-geo-limits-loader { .color-var(@theme-vars[main-color]); .background-color-var(@theme-vars[main-bg]); @@ -29,48 +17,12 @@ // Layout // ************** -.gn-share-panel { - position: relative; - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - .gn-share-panel-head { - display: flex; - align-items: center; - h2 { - flex: 1; - word-break: break-all; - margin: 0; - font-size: 1.4rem; - } - margin: 0.5rem; - .gn-share-panel-close { - width: 2rem; - height: 2rem; - border: none; - } - } - .gn-share-panel-body { - flex: 1; - overflow: auto; - position: relative; +.gn-permissions-container { + height: 550px; + max-height: 600px; + overflow-y: auto; + .ms-permissions { width: 100%; - padding: 0 0.75rem; - - .gn-permissions-container { - max-height: 600px; - overflow-y: auto; - .ms-permissions { - width: 100%; - } - .ms-permissions * { - font-size: @font-size-small; - } - } - } - .ms-popover { - display: inline-block; } } @@ -100,55 +52,3 @@ opacity: 0.6; } } - -.gn-share-link-pad { - .gn-share-link { - display: flex; - align-items: center; - margin-bottom: 0; - - textarea { - resize: none; - flex: 1; - border: none; - background: transparent; - font-family: @font-family-monospace; - } - input { - flex: 1; - border: none; - font-family: @font-family-monospace; - text-overflow: ellipsis; - } - - } - - .gn-share-page-link { - padding: 0.2rem 0; - .gn-share-title { - margin-bottom: 0; - font-size: 0.8rem; - text-transform: capitalize; - } - .checkbox { - font-size: @font-size-sm; - } - .gn-share-title-header { - justify-content: space-between; - padding: 0.5rem 0; - &.collapsible { - padding: 0.5rem 0.75rem; - border-width: 1px; - border-style: solid; - } - } - .gn-share-content { - &.collapsible { - padding: 0.5rem 0.75rem; - border-width: 1px; - border-style: solid; - border-top: none; - } - } - } -} diff --git a/geonode_mapstore_client/static/mapstore/configs/localConfig.json b/geonode_mapstore_client/static/mapstore/configs/localConfig.json index d762477604..80b65e358f 100644 --- a/geonode_mapstore_client/static/mapstore/configs/localConfig.json +++ b/geonode_mapstore_client/static/mapstore/configs/localConfig.json @@ -541,6 +541,7 @@ "labelId": "gnviewer.resource", "showPendingChangesIcon": true, "type": "dropdown", + "disableIf": "{!(state('isNewResource') || context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') || context.canCopyResource(state('gnResourceData'), state('user')) || context.resourceHasPermission(state('gnResourceData'), 'delete_resourcebase'))}", "items": [ { "type": "plugin", @@ -554,15 +555,7 @@ }, { "type": "divider", - "disableIf": "{!state('isNewResource') && !context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !context.canCopyResource(state('gnResourceData'), state('user')) || (!state('selectedLayerPermissions').includes('download_resourcebase') || !context.resourceHasPermission(state('gnResourceData'), 'download_resourcebase'))}" - }, - { - "type": "plugin", - "name": "Share" - }, - { - "type": "divider", - "disableIf": "{state('isNewResource') || !context.resourceHasPermission(state('gnResourceData'), 'delete_resourcebase')}" + "disableIf": "{!context.resourceHasPermission(state('gnResourceData'), 'delete_resourcebase')}" }, { "type": "plugin", @@ -654,6 +647,11 @@ } ] }, + { + "type": "plugin", + "name": "ShareActionButton", + "disableIf": "{state('isNewResource') || (!state('isNewResource') && !context.canAccessPermissions(state('gnResourceData')))}" + }, { "type": "divider", "disableIf": "{state('isNewResource')}" @@ -683,12 +681,6 @@ "disablePermission": true } }, - { - "name": "Share", - "cfg": { - "containerPosition": "rightOverlay" - } - }, { "name": "ResourceDetails", "cfg": { @@ -1506,6 +1498,7 @@ "labelId": "gnviewer.resource", "showPendingChangesIcon": true, "type": "dropdown", + "disableIf": "{!state('isNewResource') && !context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !context.canCopyResource(state('gnResourceData'), state('user')) && !context.resourceHasPermission(state('gnResourceData'), 'delete_resourcebase')}", "items": [ { "type": "plugin", @@ -1519,15 +1512,7 @@ }, { "type": "divider", - "disableIf": "{state('isNewResource') || (!state('isNewResource') && !context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !context.canCopyResource(state('gnResourceData'), state('user')))}" - }, - { - "type": "plugin", - "name": "Share" - }, - { - "type": "divider", - "disableIf": "{state('isNewResource') || !context.resourceHasPermission(state('gnResourceData'), 'delete_resourcebase')}" + "disableIf": "{!context.resourceHasPermission(state('gnResourceData'), 'delete_resourcebase')}" }, { "type": "plugin", @@ -1587,6 +1572,11 @@ } ] }, + { + "type": "plugin", + "name": "ShareActionButton", + "disableIf": "{state('isNewResource') || (!state('isNewResource') && !context.canAccessPermissions(state('gnResourceData')))}" + }, { "type": "divider", "disableIf": "{!context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !state('isNewResource')}" @@ -2026,13 +2016,6 @@ { "name": "Notifications" }, - { - "mandatory": true, - "name": "Share", - "cfg": { - "containerPosition": "rightOverlay" - } - }, { "name": "Swipe" }, @@ -2217,7 +2200,7 @@ "items": "{({extent: context.get(state('gnResourceSelectedLayerDataset'), 'extent')})}" }, { - "type": "linked-resources", + "type": "relations", "id": "related", "labelId": "gnviewer.linkedResources.label", "items": "{context.get(state('gnResourceSelectedLayerDataset'), 'linkedResources')}" @@ -2247,6 +2230,7 @@ "labelId": "gnviewer.resource", "showPendingChangesIcon": true, "type": "dropdown", + "disableIf": "{!context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !context.resourceHasPermission(state('gnResourceData'), 'delete_resourcebase') && !state('isNewResource') && !context.canCopyResource(state('gnResourceData'), state('user'))}", "items": [ { "type": "plugin", @@ -2260,11 +2244,7 @@ }, { "type": "divider", - "disableIf": "{state('isNewResource') || (!state('isNewResource') && !context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !context.canCopyResource(state('gnResourceData'), state('user')))}" - }, - { - "type": "plugin", - "name": "Share" + "disableIf": "{!context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase')}" }, { "name": "Sync", @@ -2308,6 +2288,11 @@ "labelId": "gnviewer.editMetadata" } ] + }, + { + "type": "plugin", + "name": "ShareActionButton", + "disableIf": "{state('isNewResource') || (!state('isNewResource') && !context.canAccessPermissions(state('gnResourceData')))}" } ] } @@ -2411,12 +2396,6 @@ { "name": "SaveAs" }, - { - "name": "Share", - "cfg": { - "containerPosition": "rightOverlay" - } - }, { "name": "Sync" }, @@ -2439,6 +2418,7 @@ "labelId": "gnviewer.resource", "type": "dropdown", "showPendingChangesIcon": true, + "disableIf": "{!(context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') || context.resourceHasPermission(state('gnResourceData'), 'delete_resourcebase') || (context.canCopyResource(state('gnResourceData'), state('user')) && context.resourceHasPermission(state('gnResourceData'), 'download_resourcebase') && (state('isNewResource') || state('selectedLayerPermissions').includes('download_resourcebase'))))}", "items": [ { "type": "plugin", @@ -2450,14 +2430,6 @@ "name": "SaveAs", "disableIf": "{!state('isNewResource') && !context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !context.canCopyResource(state('gnResourceData'), state('user')) || (!state('selectedLayerPermissions').includes('download_resourcebase') || !context.resourceHasPermission(state('gnResourceData'), 'download_resourcebase'))}" }, - { - "type": "divider", - "disableIf": "{!state('isNewResource') && !context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !context.canCopyResource(state('gnResourceData'), state('user')) || (!state('selectedLayerPermissions').includes('download_resourcebase') || !context.resourceHasPermission(state('gnResourceData'), 'download_resourcebase'))}" - }, - { - "type": "plugin", - "name": "Share" - }, { "type": "divider", "disableIf": "{!context.resourceHasPermission(state('gnResourceData'), 'delete_resourcebase')}" @@ -2508,6 +2480,11 @@ "name": "IsoDownload" } ] + }, + { + "type": "plugin", + "name": "ShareActionButton", + "disableIf": "{state('isNewResource') || (!state('isNewResource') && !context.canAccessPermissions(state('gnResourceData')))}" } ] } @@ -2542,12 +2519,6 @@ { "name": "SaveAs" }, - { - "name": "Share", - "cfg": { - "containerPosition": "rightOverlay" - } - }, { "name": "MediaViewer" }, @@ -2570,6 +2541,7 @@ "labelId": "gnviewer.resource", "type": "dropdown", "showPendingChangesIcon": true, + "disableIf": "{!context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !state('isNewResource') && !context.canCopyResource(state('gnResourceData'), state('user')) && !context.resourceHasPermission(state('gnResourceData'), 'delete_resourcebase')}", "items": [ { "type": "plugin", @@ -2585,10 +2557,6 @@ "type": "divider", "disableIf": "{state('isNewResource') || (!state('isNewResource') && !context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !context.canCopyResource(state('gnResourceData'), state('user')))}" }, - { - "type": "plugin", - "name": "Share" - }, { "name": "Sync", "type": "plugin", @@ -2632,6 +2600,11 @@ } ] }, + { + "type": "plugin", + "name": "ShareActionButton", + "disableIf": "{state('isNewResource') || (!state('isNewResource') && !context.canAccessPermissions(state('gnResourceData')))}" + }, { "type": "divider", "disableIf": "{!context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase')}" @@ -2671,12 +2644,6 @@ { "name": "Sync" }, - { - "name": "Share", - "cfg": { - "containerPosition": "rightOverlay" - } - }, { "name": "DashboardEditor", "cfg": { @@ -3530,6 +3497,7 @@ "labelId": "gnviewer.resource", "showPendingChangesIcon": true, "type": "dropdown", + "disableIf": "{!state('isNewResource') && !context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !context.canCopyResource(state('gnResourceData'), state('user')) && !context.resourceHasPermission(state('gnResourceData'), 'delete_resourcebase')}", "items": [ { "type": "plugin", @@ -3541,14 +3509,6 @@ "name": "SaveAs", "disableIf": "{!state('isNewResource') && !context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !context.canCopyResource(state('gnResourceData'), state('user'))}" }, - { - "type": "divider", - "disableIf": "{state('isNewResource') || (!state('isNewResource') && !context.resourceHasPermission(state('gnResourceData'), 'change_resourcebase') && !context.canCopyResource(state('gnResourceData'), state('user')))}" - }, - { - "type": "plugin", - "name": "Share" - }, { "type": "divider", "disableIf": "{state('isNewResource') || !context.resourceHasPermission(state('gnResourceData'), 'delete_resourcebase')}" @@ -3587,6 +3547,11 @@ } ] }, + { + "type": "plugin", + "name": "ShareActionButton", + "disableIf": "{state('isNewResource') || (!state('isNewResource') && !context.canAccessPermissions(state('gnResourceData')))}" + }, { "type": "divider" }, @@ -3626,12 +3591,6 @@ { "name": "SaveAs" }, - { - "name": "Share", - "cfg": { - "containerPosition": "rightOverlay" - } - }, { "name": "ContextCreator", "cfg": { 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 95bafe5aea..82ebc67aeb 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 @@ -359,7 +359,7 @@ "readMore": "Weiterlesen", "readLess": "Weniger lesen", "linkedResources": { - "label": "Verknüpfte Ressourcen", + "label": "Beziehungen", "linkedBy": "Verbunden von", "linkedTo": "Verbunden mit", "uses": "Verwendet", @@ -418,10 +418,10 @@ } } }, - "allResources": "All resources", + "allResources": "Alle Ressourcen", "assets": "Assets", - "management": "Verwaltung", - "resourceManagement": "Ressourcenverwaltung", + "settings": "Einstellungen", + "publishing": "Veröffentlichung", "timeSeriesSetting": { "title": "Zeitreiheneinstellungen", "hasTime": "Hat Zeit?", 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 277063aa92..c0f732f461 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 @@ -359,7 +359,7 @@ "readMore": "Read more", "readLess": "Read less", "linkedResources": { - "label": "Linked Resources", + "label": "Relations", "linkedBy": "Linked By", "linkedTo": "Linked To", "uses": "Uses", @@ -420,8 +420,8 @@ }, "allResources": "All resources", "assets": "Assets", - "management": "Management", - "resourceManagement": "Resource management", + "settings": "Settings", + "publishing": "Publishing", "timeSeriesSetting": { "title": "Time series settings", "hasTime": "Has time?", 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 6696c2e44d..979fa245b9 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 @@ -358,7 +358,7 @@ "readMore": "Leer más", "readLess": "Leer menos", "linkedResources": { - "label": "Recursos vinculados", + "label": "Relaciones", "linkedBy": "Vinculado por", "linkedTo": "Vinculado a", "uses": "Usos", @@ -417,10 +417,10 @@ } } }, - "allResources": "All resources", + "allResources": "Todos los recursos", "assets": "Assets", - "management": "Gestión", - "resourceManagement": "Gestión de recursos", + "settings": "Configuración", + "publishing": "Publicación", "timeSeriesSetting": { "title": "Configuración de series temporales", "hasTime": "¿Tiene tiempo?", 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 1f882b76d5..bac10b5c11 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 @@ -329,7 +329,7 @@ "readMore": "Read more", "readLess": "Read less", "linkedResources": { - "label": "Linked Resources", + "label": "Relations", "linkedBy": "Linked By", "linkedTo": "Linked To", "uses": "Uses", @@ -390,8 +390,8 @@ }, "allResources": "All resources", "assets": "Assets", - "management": "Management", - "resourceManagement": "Resource management", + "settings": "Settings", + "publishing": "Publishing", "timeSeriesSetting": { "title": "Time series settings", "hasTime": "Has time?", 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 5174267008..7164839b4a 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 @@ -359,7 +359,7 @@ "readMore": "En savoir plus", "readLess": "Lire moins", "linkedResources": { - "label": "Ressources liées", + "label": "Relations", "linkedBy": "Lié par", "linkedTo": "Lié à", "uses": "Les usages", @@ -418,10 +418,10 @@ } } }, - "allResources": "All resources", + "allResources": "Tous les ressources", "assets": "Assets", - "management": "Gestion", - "resourceManagement": "Gestion des ressources", + "settings": "Paramètres", + "publishing": "Publication", "timeSeriesSetting": { "title": "Paramètres des séries temporelles", "hasTime": "A du temps?", 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 737278cb12..24832d3c7f 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 @@ -329,7 +329,7 @@ "readMore": "Read more", "readLess": "Read less", "linkedResources": { - "label": "Linked Resources", + "label": "Relations", "linkedBy": "Linked By", "linkedTo": "Linked To", "uses": "Uses", @@ -390,8 +390,8 @@ }, "allResources": "All resources", "assets": "Assets", - "management": "Management", - "resourceManagement": "Resource management", + "settings": "Settings", + "publishing": "Publishing", "timeSeriesSetting": { "title": "Time series settings", "hasTime": "Has time?", 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 363265c206..29a0bde245 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 @@ -361,7 +361,7 @@ "readMore": "Leggi di più", "readLess": "Leggi di meno", "linkedResources": { - "label": "Risorse collegate", + "label": "Relazioni", "linkedBy": "Collegato da", "linkedTo": "Collegato a", "uses": "Usi", @@ -420,10 +420,10 @@ } } }, - "allResources": "All resources", - "assets": "Assets", - "management": "Gestione", - "resourceManagement": "Gestione della risorsa", + "allResources": "Tutte le risorse", + "assets": "Asset", + "settings": "Impostazioni", + "publishing": "Pubblicazione", "timeSeriesSetting": { "title": "Impostazioni serie temporali", "hasTime": "Ha tempo?", 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 cf54f5d4a2..5ab0d3b04f 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 @@ -329,7 +329,7 @@ "readMore": "Read more", "readLess": "Read less", "linkedResources": { - "label": "Linked Resources", + "label": "Relations", "linkedBy": "Linked By", "linkedTo": "Linked To", "uses": "Uses", @@ -390,8 +390,8 @@ }, "allResources": "All resources", "assets": "Assets", - "management": "Management", - "resourceManagement": "Resource management", + "settings": "Settings", + "publishing": "Publishing", "timeSeriesSetting": { "title": "Time series settings", "hasTime": "Has time?", 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 52338ce878..23d06688eb 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 @@ -329,7 +329,7 @@ "readMore": "Read more", "readLess": "Read less", "linkedResources": { - "label": "Linked Resources", + "label": "Relations", "linkedBy": "Linked By", "linkedTo": "Linked To", "uses": "Uses", @@ -390,8 +390,8 @@ }, "allResources": "All resources", "assets": "Assets", - "management": "Management", - "resourceManagement": "Resource management", + "settings": "Settings", + "publishing": "Publishing", "timeSeriesSetting": { "title": "Time series settings", "hasTime": "Has time?", 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 9dbe12fedb..f10330744d 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 @@ -329,7 +329,7 @@ "readMore": "Read more", "readLess": "Read less", "linkedResources": { - "label": "Linked Resources", + "label": "Relations", "linkedBy": "Linked By", "linkedTo": "Linked To", "uses": "Uses", @@ -390,8 +390,8 @@ }, "allResources": "All resources", "assets": "Assets", - "management": "Management", - "resourceManagement": "Resource management", + "settings": "Settings", + "publishing": "Publishing", "timeSeriesSetting": { "title": "Time series settings", "hasTime": "Has time?", 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 27b2b8171c..b4c76e07d9 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 @@ -330,7 +330,7 @@ "readMore": "Read more", "readLess": "Read less", "linkedResources": { - "label": "Linked Resources", + "label": "Relations", "linkedBy": "Linked By", "linkedTo": "Linked To", "uses": "Uses", @@ -391,8 +391,8 @@ }, "allResources": "All resources", "assets": "Assets", - "management": "Management", - "resourceManagement": "Resource management", + "settings": "Settings", + "publishing": "Publishing", "timeSeriesSetting": { "title": "Time series settings", "hasTime": "Has time?", 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 a6ab94df8e..50e80c8095 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 @@ -329,7 +329,7 @@ "readMore": "Read more", "readLess": "Read less", "linkedResources": { - "label": "Linked Resources", + "label": "Relations", "linkedBy": "Linked By", "linkedTo": "Linked To", "uses": "Uses", @@ -390,8 +390,8 @@ }, "allResources": "All resources", "assets": "Assets", - "management": "Management", - "resourceManagement": "Resource management", + "settings": "Settings", + "publishing": "Publishing", "timeSeriesSetting": { "title": "Time series settings", "hasTime": "Has time?", 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 d1b95cf3e2..55f81f1a7c 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 @@ -329,7 +329,7 @@ "readMore": "Read more", "readLess": "Read less", "linkedResources": { - "label": "Linked Resources", + "label": "Relations", "linkedBy": "Linked By", "linkedTo": "Linked To", "uses": "Uses", @@ -390,8 +390,8 @@ }, "allResources": "All resources", "assets": "Assets", - "management": "Management", - "resourceManagement": "Resource management", + "settings": "Settings", + "publishing": "Publishing", "timeSeriesSetting": { "title": "Time series settings", "hasTime": "Has time?",