From 0079637acb4b3bf091bea3284960094cac1478c8 Mon Sep 17 00:00:00 2001 From: Claudia Ifrim Date: Tue, 6 Jul 2021 14:27:49 +0300 Subject: [PATCH] Refs#135696 - add privacy notice for site location map --- .../manage/Blocks/SiteLocationMap/View.jsx | 99 ++++++++++++------- .../manage/Blocks/SiteLocationMap/style.css | 46 ++++++++- 2 files changed, 105 insertions(+), 40 deletions(-) diff --git a/src/components/manage/Blocks/SiteLocationMap/View.jsx b/src/components/manage/Blocks/SiteLocationMap/View.jsx index 629d04f..7a095ae 100644 --- a/src/components/manage/Blocks/SiteLocationMap/View.jsx +++ b/src/components/manage/Blocks/SiteLocationMap/View.jsx @@ -10,12 +10,26 @@ import { getSiteLocationURL } from './index'; import qs from 'querystring'; import './style.css'; +// SVGs +import mapPlaceholder from '~/components/manage/Blocks/DiscodataOpenlayersMapBlock/map_placeholder.png'; +// Privacy Protection VOLTO +import PrivacyProtection from '~/components/manage/Blocks/DiscodataOpenlayersMapBlock/PrivacyProtection'; + const View = (props) => { const [options, setOptions] = React.useState({}); const [vectorSource, setVectorSource] = useState(null); const { format, proj, source, style } = openlayers; const { siteInspireId } = { ...props.query, ...props.discodata_query }; + const dataprotection = { + enabled: true, + privacy_statement: + 'This map is hosted by a third party [Environmental Systems Research Institute, INC: "ESRI"]. By showing th external content you accept the terms and conditions of www.esri.com. This includes their cookie policies, which e have no control over.', + privacy_cookie_key: 'site-location-map', + placeholder_image: mapPlaceholder, + type: props.data.privacy?.value || 'big', + }; + React.useState(() => { if (__SERVER__) return; const vs = vectorSource || new source.Vector(); @@ -54,47 +68,56 @@ const View = (props) => { return (
- - + - - - + + + + + + - - - - + +
); diff --git a/src/components/manage/Blocks/SiteLocationMap/style.css b/src/components/manage/Blocks/SiteLocationMap/style.css index cdd1b63..e27c54f 100644 --- a/src/components/manage/Blocks/SiteLocationMap/style.css +++ b/src/components/manage/Blocks/SiteLocationMap/style.css @@ -7,6 +7,7 @@ div#view .ui.container > .site-location-map { display: flex; justify-content: center; margin-bottom: 1rem; + height: 400px; } .site-location-map.visible.transition { @@ -14,6 +15,47 @@ div#view .ui.container > .site-location-map { } .site-location-map .ol-map { - height: 300px; - min-height: 300px; + height: 400px; + min-height: 400px; +} + +.privacy-protection { + padding: 0; + background: transparent; +} + +.privacy-protection .overlay { + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.35); +} + +.privacy-protection .background { + opacity: 0.8; +} + +.privacy-protection .wrapped { + position: absolute; + top: 50%; + left: 50%; + width: 400px; + background: #ffffff; + border-radius: 10px; + transform: translate(-50%, -50%); +} + +.privacy-protection .wrapped .ui.message { + background: #ffffff; + border-radius: 10px; +} + +.privacy-protection .wrapped p.discreet { + padding: 1.5em 1.5em; +} + +.privacy-protection .privacy-button { + display: flex; + flex-flow: row; + align-items: center; + justify-content: center; }