Skip to content

Commit

Permalink
refactored home menu resource links (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
giohappy authored Jun 9, 2021
1 parent fa86ad0 commit 9ec4dd7
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,31 +315,27 @@
"labelId": "gnhome.createNew",
"authenticated": true,
"type": "dropdown",
"perms": [{ "type": "user", "value": "add_resource" }],
"items": [
{
"labelId": "gnhome.layer",
"value": "map",
"type": "link",
"href": "/layers/upload",
"authenticated": true,
"perms": [{ "type": "user", "value": "add_resource" }]
"authenticated": true
},
{
"labelId": "gnhome.map",
"value": "map",
"type": "link",
"href": "/maps/new",
"authenticated": true,
"perms": [{ "type": "user", "value": "add_resource" }]
"authenticated": true
},
{
"labelId": "gnhome.geostory",
"value": "geostory",
"type": "link",
"href": "/apps/new?appType=GeoStory",
"authenticated": true,
"perms": [{ "type": "user", "value": "add_resource" }]
"authenticated": true
}

]
Expand Down Expand Up @@ -440,42 +436,47 @@
"menu": {
"items": [
{
"labelId": "gnhome.data",
"labelId": "gnhome.layers",
"type": "dropdown",
"items": [
{
"type": "link",
"href": "/layers/?limit=5",
"href": "#/search/?filter{resource_type.in}=layer",
"labelId": "gnhome.layers",
"badge": "{state('geoNodeResourcesInfo') && state('geoNodeResourcesInfo').layersTotalCount}",
"permissions": [],
"allowedRoles": []
},
{
"type": "link",
"href": "/documents/?limit=5",
"labelId": "gnhome.documents",
"badge": "{state('geoNodeResourcesInfo') && state('geoNodeResourcesInfo').documentsTotalCount}",
"type": "divider",
"authenticated": true,
"permissions": [],
"allowedRoles": []
},
{
"type": "link",
"href": "/services/?limit=5",
"labelId": "gnhome.remoteServices",
"href": "/layers/upload",
"labelId": "gnhome.uploadLayer",
"authenticated": true,
"permissions": [],
"allowedRoles": []
},
}
]
},
{
"labelId": "gnhome.documents",
"type": "dropdown",
"items": [
{
"type": "divider",
"authenticated": true,
"type": "link",
"href": "#/search/?filter{resource_type.in}=document",
"labelId": "gnhome.documents",
"badge": "{state('geoNodeResourcesInfo') && state('geoNodeResourcesInfo').documentsTotalCount}",
"permissions": [],
"allowedRoles": []
},
{
"type": "link",
"href": "/layers/upload",
"labelId": "gnhome.uploadLayer",
"type": "divider",
"authenticated": true,
"permissions": [],
"allowedRoles": []
Expand All @@ -487,36 +488,19 @@
"authenticated": true,
"permissions": [],
"allowedRoles": []
},
{
"type": "link",
"href": "/services/register/",
"labelId": "gnhome.addRemoteService",
"authenticated": true,
"allowedRoles": [
"admin"
]
}
]
},
{
"labelId": "gnhome.maps",
"authenticated": false,
"type": "link",
"subType": "tag",
"href": "/maps/?limit=5",
"badge": "{state('geoNodeResourcesInfo') && state('geoNodeResourcesInfo').mapsTotalCount}"
},
{
"labelId": "gnhome.maps",
"type": "dropdown",
"authenticated": true,
"badge": "{state('geoNodeResourcesInfo') && state('geoNodeResourcesInfo').mapsTotalCount}",
"items": [
{
"type": "link",
"href": "/maps/?limit=5",
"labelId": "gnhome.exploreMaps"
"href": "#/search/?filter{resource_type.in}=map",
"labelId": "gnhome.exploreMaps",
"badge": "{state('geoNodeResourcesInfo') && state('geoNodeResourcesInfo').mapsTotalCount}"
},
{
"type": "link",
Expand All @@ -526,11 +510,22 @@
]
},
{
"type": "link",
"subType": "tag",
"href": "/apps/?limit=5",
"labelId": "gnhome.apps",
"badge": "{state('geoNodeResourcesInfo') && state('geoNodeResourcesInfo').geoappsTotalCount}"
"labelId": "gnhome.geostories",
"type": "dropdown",
"authenticated": true,
"items": [
{
"type": "link",
"href": "#/search/?filter{resource_type.in}=geostory",
"labelId": "gnhome.geostories",
"badge": "{state('geoNodeResourcesInfo') && state('geoNodeResourcesInfo').geoappsTotalCount}"
},
{
"type": "link",
"href": "/apps/new?appType=GeoStory",
"labelId": "gnhome.createGeostory"
}
]
},
{
"labelId": "gnhome.about",
Expand Down Expand Up @@ -598,17 +593,14 @@
"type": "link",
"href": "${detail_url}",
"labelId": "gnhome.open",
"icon": "edit",
"perms": [{ "type": "resource", "value": "view_resourcebase" }]

"icon": "edit"
},
{
"type": "link",
"href":"${detail_url}/metadata_advanced",
"labelId": "gnhome.update",
"icon": "paste",
"authenticated": true,
"perms": [{ "type": "resource", "value": "change_resourcebase" }],
"allowedGroups": [
"admin"
]
Expand All @@ -617,7 +609,6 @@
"type": "link",
"href":"${detail_url}/remove",
"labelId": "gnhome.delete",
"perms": [{ "type": "resource", "value": "delete_resourcebase" }],
"icon": "trash",
"authenticated": true,
"allowedGroups": [
Expand Down Expand Up @@ -3353,8 +3344,7 @@
"document_viewer": [
{ "name": "ViewerLayout" },
{ "name": "ActionNavbar" },
{ "name": "BrandNavbar" },
{ "name": "DetailViewer"}
{ "name": "BrandNavbar" }
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@
"zA": "Z A",
"mostPopular": "Beliebteste",
"data": "Daten",
"layers": "Ebenen",
"layer": "Dataset",
"layers": "Datasets",
"documents": "Dokumente",
"remoteServices": "Remote-Dienste",
"maps": "Karten",
"map": "Karte",
"layer": "Ebene",
"geostory": "GeoStory",
"geostories": "GeoStories",
"createGeostory": "Create geostory",
"createNew": "Erstelle neu",
"about": "Über",
"people": "Benutzer",
Expand Down Expand Up @@ -64,6 +66,7 @@
"privacy": "Datenschutz",
"extent": "Ausmaß",
"enableFilterByExtent": "Filter nach ausmaß aktivieren",
"advancedSearch": "Erweiterte suche",
"apply": "Anwenden",
"clearFilters": "Filter löschen",

Expand All @@ -88,7 +91,8 @@
"addRemoteService": "Remote Service hinzufügen",
"exploreMaps": "Karten erkunden",
"createMap": "Karte erstellen",
"apps": "Apps",
"apps": "app",
"createApp": "Karte app",
"announcements": "Ankündigungen",
"inviteUsers": "Benutzer einladen",
"addUser": "Benutzer hinzufügen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@
"aZ": "A Z",
"zA": "Z A",
"mostPopular": "Most popular",
"data": "Data",
"layers": "Layers",
"data": "Dati",
"layer": "Dataset",
"layers": "Datasets",
"documents": "Documents",
"remoteServices": "Remote services",
"map": "Map",
"layer": "Layer",
"geostory": "GeoStory",
"geostories": "GeoStories",
"createGeostory": "Create geostory",
"createNew": "Create new",
"maps": "Maps",
"about": "About",
Expand Down Expand Up @@ -64,6 +66,7 @@
"privacy": "Privacy",
"extent": "Extent",
"enableFilterByExtent": "Enable filter by extent",
"advancedSearch": "Advanced search",
"apply": "Apply",
"clearFilters": "Clear filters",

Expand All @@ -89,6 +92,7 @@
"exploreMaps": "Explore maps",
"createMap": "Create map",
"apps": "Apps",
"createApp": "Create app",
"announcements": "Announcements",
"inviteUsers": "Invite users",
"addUser": "Add user",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@
"zA": "Z A",
"mostPopular": "Más popular",
"data": "Datos",
"layers": "Capas",
"layer": "Dataset",
"layers": "Datasets",
"documents": "Documentos",
"remoteServices": "Servicios remotos",
"maps": "Mapas",
"map": "Mapa",
"layer": "Capa",
"geostory": "GeoStory",
"geostories": "GeoStories",
"createGeostory": "Crear geostory",
"createNew": "Crear nuevo",
"about": "Acerca de",
"people": "Personas",
Expand Down Expand Up @@ -64,6 +66,7 @@
"privacy": "Privacy",
"extent": "Extensión",
"enableFilterByExtent": "Habilitar el filtro por extensión",
"advancedSearch": "Búsqueda avanzada",
"apply": "Aplicar",
"clearFilters": "Quitar filtros",

Expand All @@ -89,6 +92,7 @@
"exploreMaps": "Explora mapas",
"createMap": "Crear mapa",
"apps": "Apps",
"createApp": "Crear app",
"announcements": "Anuncios",
"inviteUsers": "Invitar usuarios",
"addUser": "Agregar usuario",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@
"zA": "Z A",
"mostPopular": "Les plus populaires",
"data": "Données",
"layers": "Couches",
"layer": "Dataset",
"layers": "Datasets",
"documents": "Documents",
"remoteServices": "Services à distance",
"maps": "Cartes",
"map": "Carte",
"layer": "Couche",
"geostory": "GeoStory",
"geostories": "GeoStories",
"createGeostory": "Créer une geostory",
"createNew": "Créer un nouveau",
"about": "À propos",
"people": "Personnes",
Expand Down Expand Up @@ -64,6 +66,7 @@
"privacy": "Privacy",
"extent": "Étendue",
"enableFilterByExtent": "Activer le filtre par étendue",
"advancedSearch": "Recherche vvancée",
"apply": "Appliquer",
"clearFilters": "Effacer les filtres",

Expand All @@ -89,6 +92,7 @@
"exploreMaps": "Explorer les cartes",
"createMap": "Créer une carte",
"apps": "Apps",
"createApp": "Créer une app",
"announcements": "Annonces",
"inviteUsers": "Inviter des utilisateurs",
"addUser": "Ajouter un utilisateur",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,23 @@
"aZ": "A Z",
"zA": "Z A",
"mostPopular": "Più popolare",
"data": "Dato",
"layers": "Layers",
"data": "Dati",
"layer": "Dataset",
"layers": "Datasets",
"documents": "Documenti",
"remoteServices": "Servizi remoti",
"maps": "Mappe",
"map": "Mappa",
"layer": "Layer",
"geostory": "Geostory",
"geostories": "GeoStories",
"createGeostory": "Create geostory",
"createNew": "Crea nuova",
"about": "A proposito",
"people": "Utenti",
"groups": "Gruppi",
"groupsCategories": "Categorie gruppo",
"view": "View",
"viewLayer": "Visualizza layer",
"viewLayer": "Visualizza livello",
"viewMap": "Visualizza mappa",
"viewGeoStory": "Visualizza GeoStory",
"viewDocument": "Visualizza documento",
Expand Down Expand Up @@ -66,6 +68,7 @@
"privacy": "Privacy",
"extent": "Estensione",
"enableFilterByExtent": "Abilita filtro per estensione",
"advancedSearch": "Ricerca avanzata",
"apply": "Applica",
"clearFilters": "Cancella filtri",

Expand All @@ -91,6 +94,7 @@
"exploreMaps": "Esplora mappe",
"createMap": "Crea mappa",
"apps": "Apps",
"createApp": "Crea app",
"announcements": "Notizie",
"inviteUsers": "Invita utenti",
"addUser": "Aggiungi utente",
Expand Down

0 comments on commit 9ec4dd7

Please sign in to comment.