From 5d0304a9891dd4507d3e1dc6ea6855a0ddd2779c Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Wed, 26 Jun 2024 15:18:51 +0200 Subject: [PATCH] Updated the template --- .../d4gna_to_catalogue.ftl | 45 ++++++++++++++----- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/D4S_UCDs/DEV/devVRE/catalogue/binding/freemarker_templates/d4gna_to_catalogue.ftl b/D4S_UCDs/DEV/devVRE/catalogue/binding/freemarker_templates/d4gna_to_catalogue.ftl index be32e32..f182cd4 100644 --- a/D4S_UCDs/DEV/devVRE/catalogue/binding/freemarker_templates/d4gna_to_catalogue.ftl +++ b/D4S_UCDs/DEV/devVRE/catalogue/binding/freemarker_templates/d4gna_to_catalogue.ftl @@ -140,23 +140,29 @@ <#-- -Starting document mapping to Catalogue +############################################################ +# +# +# Starting document mapping to Catalogue +# +# +############################################################ --> <#compress> { "name": "${jsonProj._id}", - "title": "${theDocument.nome}", + "title": "${sanitizeString(theDocument.nome)}", "license_id": "CC-BY-SA-4.0", "private": false, <#assign sanitizedNotes = sanitizeString(theDocument.introduzione) /> "notes": "${sanitizedNotes}", <#-- -####################################### +###################### RESOURCES -####################################### +###################### --> <#-- Mapping "Relazione Scavo" as resource --> @@ -197,11 +203,11 @@ Starting document mapping to Catalogue <#-- -####################################### +###################### TAGS -####################################### +###################### --> <#-- Mapping "paroleChiaveLibere" as tag --> @@ -214,11 +220,11 @@ Starting document mapping to Catalogue <#-- -####################################### +###################### GROUPS -####################################### +###################### --> <#-- Mapping the year of the "dataInizioProgetto" as group --> @@ -230,14 +236,19 @@ Starting document mapping to Catalogue <#-- -####################################### +###################### EXTRAS -####################################### +###################### --> <#-- Mapping extras fields --> + +<#if theDocument.contributore??> +<@assignExtraField key="Contributore" value=theDocument.contributore asObject=false> + + <#if theDocument.responsabile??> <@assignExtraField key="Responsabile dei contenuti" value=theDocument.responsabile asObject=false> @@ -250,6 +261,10 @@ Starting document mapping to Catalogue <@assignExtraField key="Ufficio MiC competente per territorio" value=theDocument.ufficioMic asObject=false> +<#if theDocument.funzionarioResponsabile??> +<@assignExtraField key="Funzionario Responsabile" value=theDocument.funzionarioResponsabile asObject=false> + + <#if theDocument.fontiFinanziamento??> <#if theDocument.fontiFinanziamento?is_sequence> <#list theDocument.fontiFinanziamento as my_extra> @@ -260,6 +275,16 @@ Starting document mapping to Catalogue +<#if theDocument.risorseCorrelate??> +<#if theDocument.risorseCorrelate?is_sequence> + <#list theDocument.risorseCorrelate as my_extra> + <@assignExtraField key="Risorse Correlate" value=my_extra asObject=false> + + <#else> + <@assignExtraField key="Risorse Correlate" value=theDocument.risorseCorrelate asObject=false> + + + <#if theDocument.dataInizioProgetto??> <@assignExtraField key="Data inizio Campagna" value=theDocument.dataInizioProgetto?trim asObject=false>