diff --git a/core/src/main/java/org/fao/geonet/util/XslUtil.java b/core/src/main/java/org/fao/geonet/util/XslUtil.java index ea0f1b6877..f375b3079b 100644 --- a/core/src/main/java/org/fao/geonet/util/XslUtil.java +++ b/core/src/main/java/org/fao/geonet/util/XslUtil.java @@ -266,6 +266,8 @@ public static MultiPolygon toMultiPolygon(Geometry geometry) { private static String headerHeight; private static String useLegacyHeader; private static String headerScript; + private static String logoUrl; + private static String georchestraStylesheet; public static String getGeorchestraHeaderUrl(){ @@ -332,6 +334,38 @@ public static String getGeorchestraHeaderScript(){ return XslUtil.headerScript; } + public static String getGeorchestraHeaderLogo(){ + + if(XslUtil.logoUrl == null) { + + // Set default value + XslUtil.logoUrl = "https://www.georchestra.org/public/georchestra-logo.svg"; + + // Load value from datadir + Properties properties = XslUtil.loadDatadirProperties(); + if (properties.containsKey("logoUrl")) + XslUtil.logoUrl = properties.getProperty("logoUrl"); + } + + return XslUtil.logoUrl; + } + + public static String getGeorchestraHeaderStylesheet(){ + + if(XslUtil.georchestraStylesheet == null) { + + // Set default value + XslUtil.georchestraStylesheet = ""; + + // Load value from datadir + Properties properties = XslUtil.loadDatadirProperties(); + if (properties.containsKey("georchestraStylesheet")) + XslUtil.georchestraStylesheet = properties.getProperty("georchestraStylesheet"); + } + + return XslUtil.georchestraStylesheet; + } + private static Properties loadProperties(File path, Properties prop) throws IOException { try(FileInputStream fisProp = new FileInputStream(path)) { InputStreamReader isrProp = new InputStreamReader(fisProp, "UTF8"); diff --git a/web/src/main/webapp/xslt/base-layout.xsl b/web/src/main/webapp/xslt/base-layout.xsl index 98bbb5b095..122cff75d4 100644 --- a/web/src/main/webapp/xslt/base-layout.xsl +++ b/web/src/main/webapp/xslt/base-layout.xsl @@ -69,7 +69,7 @@ and a facet search to get main site information. -->
-