Skip to content

Commit

Permalink
[Fixes 1156] Rename Export and Rearrange Download menu items (#1157)
Browse files Browse the repository at this point in the history
* Fixes 1156

* fixed trans
  • Loading branch information
DavidQuartz committed Aug 22, 2022
1 parent b370740 commit 6379155
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 12 deletions.
19 changes: 19 additions & 0 deletions geonode_mapstore_client/client/js/plugins/actionnavbar/buttons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,25 @@ export const FullScreenActionButton = connect(createSelector([
);
});

export const DataDownloadActionButton = connect(
() => ({}),
{ onClick: setControlProperty.bind(null, 'layerdownload', 'enabled', true, true) }
)(({
onClick,
variant,
size
}) => {
return (
<Button
variant={variant}
size={size}
onClick={() => onClick()}
>
<Message msgId="gnhome.dataset" />
</Button>
);
});

export const LayerDownloadActionButton = connect(
() => ({}),
{ onClick: setControlProperty.bind(null, 'layerdownload', 'enabled', true, true) }
Expand Down
13 changes: 13 additions & 0 deletions geonode_mapstore_client/client/js/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
CatalogActionButton,
MeasureActionButton,
LayerDownloadActionButton,
DataDownloadActionButton,
AnnotationsActionButton,
FullScreenActionButton,
FilterLayerActionButton
Expand Down Expand Up @@ -116,6 +117,18 @@ export const plugins = {
}
}
),
DataDownloadPlugin: toLazyPlugin(
'LayerDownload',
() => import(/* webpackChunkName: 'plugins/data-download' */ '@mapstore/framework/plugins/LayerDownload'),
{
containers: {
ActionNavbar: {
name: 'DataDownload',
Component: DataDownloadActionButton
}
}
}
),
SwipePlugin: toLazyPlugin(
'Swipe',
() => import(/* webpackChunkName: 'plugins/swipe' */ '@mapstore/framework/plugins/Swipe')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -930,19 +930,20 @@
},
{
"labelId": "gnviewer.download",
"disablePluginIf": "{!state('selectedLayerPermissions').includes('download_resourcebase')}",
"type": "dropdown",
"items": [
{
"type": "plugin",
"name": "IsoDownload"
"name": "DataDownload"
},
{
"type": "plugin",
"name": "DublinCoreDownload"
"name": "IsoDownload"
},
{
"type": "plugin",
"name": "LayerDownload"
"name": "DublinCoreDownload"
}
]
},
Expand Down Expand Up @@ -1280,6 +1281,109 @@
{
"name": "AddLayer"
},
{
"name": "DataDownload",
"cfg": {
"formats": [
{
"name": "application/json",
"label": "GeoJSON",
"type": "vector",
"validServices": [
"wps"
]
},
{
"name": "application/arcgrid",
"label": "ArcGrid",
"type": "raster",
"validServices": [
"wps"
]
},
{
"name": "image/tiff",
"label": "TIFF",
"type": "raster",
"validServices": [
"wps"
]
},
{
"name": "image/png",
"label": "PNG",
"type": "raster",
"validServices": [
"wps"
]
},
{
"name": "image/jpeg",
"label": "JPEG",
"type": "raster",
"validServices": [
"wps"
]
},
{
"name": "application/wfs-collection-1.0",
"label": "GML (FeatureCollection)",
"type": "vector",
"validServices": [
"wps"
]
},
{
"name": "application/wfs-collection-1.1",
"label": "GML (WFS 1.1.0 FeatureCollection)",
"type": "vector",
"validServices": [
"wps"
]
},
{
"name": "application/zip",
"label": "Shapefile",
"type": "vector",
"validServices": [
"wps"
]
},
{
"name": "text/csv",
"label": "CSV",
"type": "vector",
"validServices": [
"wps"
]
},
{
"name": "application/geopackage+sqlite3",
"label": "GeoPackage",
"type": "vector",
"validServices": [
"wps"
]
},
{
"name": "application/geopackage+sqlite3",
"label": "GeoPackage",
"type": "raster",
"validServices": [
"wps"
]
},
{
"name": "application/vnd.google-earth.kml+xml",
"label": "KML",
"type": "vector",
"validServices": [
"wps"
]
}
]
}
},
{
"name": "FilterLayer"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"zA": "Z A",
"mostPopular": "Beliebteste",
"data": "Daten",
"layer": "Datensatz",
"layers": "Datensätze",
"dataset": "Datensatz",
"datasets": "Datensätze",
"document": "Dokument",
"documents": "Dokumente",
"remoteServices": "Remote-Dienste",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"aZ": "A Z",
"zA": "Z A",
"mostPopular": "Most popular",
"data": "Dati",
"data": "Data",
"dataset": "Dataset",
"datasets": "Datasets",
"document": "Document",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"zA": "Z A",
"mostPopular": "Más popular",
"data": "Datos",
"dataset": "Dataset",
"datasets": "Datasets",
"dataset": "Conjunto de datos",
"datasets": "Conjuntos de datos",
"document": "Documento",
"documents": "Documentos",
"remoteServices": "Servicios remotos",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"zA": "Z A",
"mostPopular": "Les plus populaires",
"data": "Données",
"dataset": "Dataset",
"datasets": "Datasets",
"dataset": "Base de données",
"datasets": "Ensembles de données",
"document": "Document",
"documents": "Documents",
"remoteServices": "Services à distance",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"zA": "Z A",
"mostPopular": "Più popolare",
"data": "Dati",
"dataset": "Dataset",
"datasets": "Datasets",
"dataset": "Set di dati",
"datasets": "Set di dati",
"document": "Documento",
"documents": "Documenti",
"remoteServices": "Servizi remoti",
Expand Down

0 comments on commit 6379155

Please sign in to comment.