From 73a2f9163423e0ee96d1910c589d59d2214d3a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20Gabrie=CC=88l?= Date: Wed, 5 Jan 2022 13:46:22 +0100 Subject: [PATCH] Additional Icons and Labels based on Protocol Further changes: - labels on more than 1 line - WFS download option now in the right columns (in stead of middle column) --- .../metadataactions/RelatedDirective.js | 2 ++ .../RelatedResourcesService.js | 4 +++ .../metadataactions/partials/related.html | 25 +++++++++++++------ .../resources/catalog/style/gn_icons.less | 8 ++++++ .../views/default/less/gn_result_default.less | 19 +++++++++++++- 5 files changed, 49 insertions(+), 9 deletions(-) diff --git a/web-ui/src/main/resources/catalog/components/metadataactions/RelatedDirective.js b/web-ui/src/main/resources/catalog/components/metadataactions/RelatedDirective.js index 130ae5f30b1..5b511d85173 100644 --- a/web-ui/src/main/resources/catalog/components/metadataactions/RelatedDirective.js +++ b/web-ui/src/main/resources/catalog/components/metadataactions/RelatedDirective.js @@ -281,6 +281,8 @@ return r.protocol.replace('WWW:DOWNLOAD:', ''); } else if (mainType.match(/W([MCF]|MT)S.*|ESRI:REST/)) { return mainType.replace('SERVICE', ''); + } else if (mainType.indexOf('KML') >= 0) { + return mainType; } else { return ''; } diff --git a/web-ui/src/main/resources/catalog/components/metadataactions/RelatedResourcesService.js b/web-ui/src/main/resources/catalog/components/metadataactions/RelatedResourcesService.js index 7ce8ebe3acd..188f969d97d 100644 --- a/web-ui/src/main/resources/catalog/components/metadataactions/RelatedResourcesService.js +++ b/web-ui/src/main/resources/catalog/components/metadataactions/RelatedResourcesService.js @@ -345,6 +345,10 @@ this.map['DEFAULT'].iconClass; }; + this.getProtocolClassIcon = function (type) { + return type.replace(':','-').replace(' ','-').toLowerCase(); + }; + this.getLabel = function(mainType, type) { // Old key before the move to API var oldKey = { diff --git a/web-ui/src/main/resources/catalog/components/metadataactions/partials/related.html b/web-ui/src/main/resources/catalog/components/metadataactions/partials/related.html index 6d82f07c526..033f5ea746f 100644 --- a/web-ui/src/main/resources/catalog/components/metadataactions/partials/related.html +++ b/web-ui/src/main/resources/catalog/components/metadataactions/partials/related.html @@ -7,20 +7,25 @@

{{::title}}

data-ng-if="type && type !== 'thumbnails'"> +
+ +
+

{{::(r.title | gnLocaliz +

+
+