From c36d990c8dfb8ca479abd9ad1f607a1ad0db1718 Mon Sep 17 00:00:00 2001 From: Lazlo Westerhof Date: Mon, 25 Sep 2023 15:00:50 +0200 Subject: [PATCH 1/3] YDA-5282: add embargo end date to landingpage --- json_landing_page.py | 3 ++- templates/landingpage.html.j2 | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/json_landing_page.py b/json_landing_page.py index cf0bf87b5..0187b933c 100644 --- a/json_landing_page.py +++ b/json_landing_page.py @@ -312,7 +312,6 @@ def json_landing_page_create_json_landing_page(callback, rodsZone, template_name # tm.globals['custom_function'] = custom_function tm.globals['persistent_identifier_to_uri'] = persistent_identifier_to_uri landing_page = tm.render( - no_active_embargo=no_active_embargo, title=title, description=description, datatype=datatype, @@ -326,6 +325,8 @@ def json_landing_page_create_json_landing_page(callback, rodsZone, template_name contributors=contributors, contacts=contacts, publication_date=publication_date, + embargo_end_date=embargo_end_date, + no_active_embargo=no_active_embargo, data_access_restriction=data_access_restriction, license=license, license_uri=license_uri, diff --git a/templates/landingpage.html.j2 b/templates/landingpage.html.j2 index ffb30f8fd..01cc3ad06 100644 --- a/templates/landingpage.html.j2 +++ b/templates/landingpage.html.j2 @@ -324,6 +324,16 @@ {{ last_modified_date }} + {% if embargo_end_date | length > 0 %} +
+
+ +
+
+ {{ embargo_end_date }} +
+
+ {% endif %} {% for pack in related_resources %} From 0b1389334efa95ac0acd6c135d8f900ce33e073c Mon Sep 17 00:00:00 2001 From: Lazlo Westerhof Date: Mon, 25 Sep 2023 15:23:02 +0200 Subject: [PATCH 2/3] Update OSM tile server. --- templates/landingpage.html.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/landingpage.html.j2 b/templates/landingpage.html.j2 index 01cc3ad06..ecd1f18dc 100644 --- a/templates/landingpage.html.j2 +++ b/templates/landingpage.html.j2 @@ -213,8 +213,8 @@ var mymap = L.map('map{{ loop.index }}').fitBounds(bounds, {'maxZoom': 5}); - L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { - attribution: '&copy OpenStreetMap contributors', + L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { + attribution: '© OpenStreetMap contributors', maxZoom: 18 }).addTo(mymap); From 687e9f117cefb0c76169dfd7b09db04b65093729 Mon Sep 17 00:00:00 2001 From: Lazlo Westerhof Date: Tue, 26 Sep 2023 16:21:35 +0200 Subject: [PATCH 3/3] Fix landingpage creation when embargo end date does not exist --- templates/landingpage.html.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/landingpage.html.j2 b/templates/landingpage.html.j2 index ecd1f18dc..05cfcd82f 100644 --- a/templates/landingpage.html.j2 +++ b/templates/landingpage.html.j2 @@ -324,7 +324,7 @@ {{ last_modified_date }} - {% if embargo_end_date | length > 0 %} + {% if embargo_end_date %}