From c0ce41cfdc5bfb3370513b3286bd58aaf626a4ba Mon Sep 17 00:00:00 2001
From: Simon Oakes
Date: Thu, 20 Feb 2020 17:37:07 +0000
Subject: [PATCH 1/7] ADD Navbar language menu macro
---
ldregistry/templates/nav/_menu-language.vm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 ldregistry/templates/nav/_menu-language.vm
diff --git a/ldregistry/templates/nav/_menu-language.vm b/ldregistry/templates/nav/_menu-language.vm
new file mode 100644
index 00000000..8c2b15f4
--- /dev/null
+++ b/ldregistry/templates/nav/_menu-language.vm
@@ -0,0 +1,17 @@
+## Render the language selection menu within the navigation bar
+
+
+ $language
+
+
\ No newline at end of file
From b63e114978e2b94cfb8711f40483f3d073390778 Mon Sep 17 00:00:00 2001
From: Simon Oakes
Date: Thu, 20 Feb 2020 17:37:40 +0000
Subject: [PATCH 2/7] ADD Language menu to navbar
---
ldregistry/templates/nav/_navbar.vm | 32 ++++++++++++++++-------------
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/ldregistry/templates/nav/_navbar.vm b/ldregistry/templates/nav/_navbar.vm
index 43be4c28..eabd1c0e 100644
--- a/ldregistry/templates/nav/_navbar.vm
+++ b/ldregistry/templates/nav/_navbar.vm
@@ -41,24 +41,28 @@
+ #if($registry.languageManager.multilingual)
+
+ #parse("nav/_menu-language.vm")
+
+ #end
+
#if($subject.isAuthenticated())
#set($user=$subject.principal)
-
- -
-
-
-
+
#end
-
From 3febd41b2fa3b96b5f870891be8e65660035635c Mon Sep 17 00:00:00 2001
From: Simon Oakes
Date: Thu, 20 Feb 2020 17:38:11 +0000
Subject: [PATCH 3/7] ADD Dbo prefix to boot register
---
.../boot/system/prefixes/prefixes-register.ttl | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/ldregistry/boot/system/prefixes/prefixes-register.ttl b/ldregistry/boot/system/prefixes/prefixes-register.ttl
index 3baa9dfd..5b9e3c3f 100644
--- a/ldregistry/boot/system/prefixes/prefixes-register.ttl
+++ b/ldregistry/boot/system/prefixes/prefixes-register.ttl
@@ -2,6 +2,7 @@
@prefix rdfs: .
@prefix owl: .
@prefix xsd: .
+@prefix dbo: .
@prefix dct: .
@prefix dc: .
@prefix foaf: .
@@ -379,4 +380,18 @@ odrs: a owl:Ontology;
dct:description "env-ui prefix registration - properties used in the UI of the environment registry"@en;
vann:preferredNamespacePrefix "env-ui";
vann:preferredNamespaceUri "http://environment.data.gov.uk/registry/structure/ui/";
+ .
+
+<_dbo> a reg:RegisterItem;
+ rdfs:label "dbo"@en;
+ reg:itemClass owl:Ontology;
+ reg:status reg:statusStable;
+ reg:definition [ reg:entity dbo: ];
+ .
+
+dbo: a owl:Ontology;
+ rdfs:label "dbo"@en;
+ dct:description "dbo (DBpedia Ontology) prefix registration."@en;
+ vann:preferredNamespacePrefix "dbo";
+ vann:preferredNamespaceUri "http://dbpedia.org/ontology/";
.
\ No newline at end of file
From 84b0c6eaee397ba7a02c3630ba8a747cad7151f2 Mon Sep 17 00:00:00 2001
From: Simon Oakes
Date: Thu, 20 Feb 2020 17:38:24 +0000
Subject: [PATCH 4/7] ADD User and language dropdown styling
---
ldregistry/ui/assets/css/ui.css | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/ldregistry/ui/assets/css/ui.css b/ldregistry/ui/assets/css/ui.css
index 2477be8d..6ba4918a 100644
--- a/ldregistry/ui/assets/css/ui.css
+++ b/ldregistry/ui/assets/css/ui.css
@@ -79,4 +79,20 @@ td.align-right {
.langTable .langValueColumn {
padding-left: 5px;
+}
+
+.dropdown.languages ul li div {
+ display: inline-block;
+}
+
+.dropdown.languages ul li div.langCode {
+ min-width: 1.5em;
+}
+
+.dropdown ul li span {
+ background-color: white;
+ color: black;
+ border-bottom: none;
+ margin-left: 10px;
+ margin-bottom: 3px;
}
\ No newline at end of file
From 6026e5fafbdbe3da5d7d468e550d662a1310a16d Mon Sep 17 00:00:00 2001
From: Simon Oakes
Date: Mon, 2 Mar 2020 17:20:45 +0000
Subject: [PATCH 5/7] FIX Exploitable query param (XSS)
---
ldregistry/templates/nav/_menu-language.vm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ldregistry/templates/nav/_menu-language.vm b/ldregistry/templates/nav/_menu-language.vm
index 8c2b15f4..1fff99cd 100644
--- a/ldregistry/templates/nav/_menu-language.vm
+++ b/ldregistry/templates/nav/_menu-language.vm
@@ -1,7 +1,7 @@
## Render the language selection menu within the navigation bar
-
- $language
+ $lib.escapeHtml($language)
+ #if($registry.languageManager.useCookies)
+
+ This website uses cookies to store your language preferences.
+
+ #end
From 215ea349b90a17c36767cb5d33b2efe3b120265a Mon Sep 17 00:00:00 2001
From: Simon Oakes
Date: Wed, 4 Mar 2020 10:05:03 +0000
Subject: [PATCH 7/7] FIX Consistent font sizing in User dropdown
---
ldregistry/ui/assets/css/ui.css | 1 +
1 file changed, 1 insertion(+)
diff --git a/ldregistry/ui/assets/css/ui.css b/ldregistry/ui/assets/css/ui.css
index 6ba4918a..192330a4 100644
--- a/ldregistry/ui/assets/css/ui.css
+++ b/ldregistry/ui/assets/css/ui.css
@@ -95,4 +95,5 @@ td.align-right {
border-bottom: none;
margin-left: 10px;
margin-bottom: 3px;
+ font-size: 15.4px;
}
\ No newline at end of file