In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

This Server has been upgraded to GitLab release 14.2.6

Commit 24daab5f authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Fix teaser colors on institutions.

parent 0d8ef216
Pipeline #21981 passed with stages
in 4 minutes and 33 seconds
......@@ -32,7 +32,7 @@ ext {
}
dependencies {
implementation 'org.memobase:memobase-service-utilities:2.0.12'
implementation 'org.memobase:memobase-service-utilities:2.0.14'
// Logging Framework
implementation "org.apache.logging.log4j:log4j-api:${log4jV}"
......
......@@ -105,6 +105,14 @@ class RdfTransformer(properties: Properties) {
}
if (input.computed_teaser_image_url != null)
resource.addLiteral(WD.image, input.computed_teaser_image_url)
input.field_teaser_color.let {
if (it != null)
resource.addProperty(MB.institutionTeaserColor, literal(it))
}
input.computed_teaser_color.let {
if (it != null)
resource.addProperty(MB.institutionComputedTeaserColor, literal(it))
}
log.info("Transformed institution ${resource.uri}.")
return Pair(resource.uri, model)
}
......
......@@ -44,5 +44,7 @@ data class Institution(
val field_institution_types: List<String>,
val field_wikidata_id: String,
val computed_teaser_image_url: String?
val computed_teaser_image_url: String?,
val field_teaser_color: String?,
val computed_teaser_color: String?
) : Input(Util.drupalInstitutionTypeIdentifier)
\ No newline at end of file
......@@ -7,6 +7,8 @@
<https://memobase.ch/institution/completeInstitution> <http://www.wikidata.org/prop/direct/P791> "ISIL-NUMBER" .
<https://memobase.ch/institution/completeInstitution> <http://www.wikidata.org/prop/direct/P856> "https://website.com" .
<https://memobase.ch/institution/completeInstitution> <http://www.wikidata.org/prop/direct/P968> "test-institution@email.com" .
<https://memobase.ch/institution/completeInstitution> <https://memobase.ch/internal/institutionComputedTeaserColor> "#303030" .
<https://memobase.ch/institution/completeInstitution> <https://memobase.ch/internal/institutionTeaserColor> "#025200" .
<https://memobase.ch/institution/completeInstitution> <https://memobase.ch/internal/isPublished> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<https://memobase.ch/institution/completeInstitution> <https://www.ica.org/standards/RiC/ontology#descriptiveNote> "<p>Beschreibung (DE)</p>\r\n\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>"@de .
<https://memobase.ch/institution/completeInstitution> <https://www.ica.org/standards/RiC/ontology#descriptiveNote> "<p>Beschreibung (FR)</p>\r\n\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>"@fr .
......
......@@ -30,6 +30,10 @@ mbcb:completeInstitution
wdt:P791 "ISIL-NUMBER" ;
wdt:P856 "https://website.com" ;
wdt:P968 "test-institution@email.com" ;
internal:institutionComputedTeaserColor
"#303030" ;
internal:institutionTeaserColor
"#025200" ;
internal:isPublished false ;
rico:descriptiveNote "<p>Beschreibung (FR)</p>\r\n\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>"@fr , "<p>Beschreibung (IT)</p>\r\n\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>"@it , "<p>Beschreibung (DE)</p>\r\n\r\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>"@de ;
rico:hasLocation [ a rico:Place ;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment