updated the template: binding for "concessioni-estere" type

This commit is contained in:
Francesco Mangiacrapa 2024-07-08 16:22:03 +02:00
parent 66aac2dacb
commit 4f491425e2
2 changed files with 46 additions and 38 deletions

View File

@ -177,25 +177,18 @@
<#-- Mapping "Immagine Rappresentative" as resource --> <#-- Mapping "Immagine Rappresentative" as resource -->
<#if theDocument.immaginiRappresentative??> <#if theDocument.immaginiRappresentative??>
<#if theDocument.immaginiRappresentative?is_sequence && theDocument.immaginiRappresentative?size gt 0> <#if theDocument.immaginiRappresentative?is_sequence && theDocument.immaginiRappresentative?size gt 0>
<#list theDocument.immaginiRappresentative as the_image> <#list theDocument.immaginiRappresentative as the_image>
<#if the_image.fileset?? && the_image.fileset._payloads??> <#if the_image.fileset?? && the_image.fileset._payloads??>
<#assign payloads = the_image.fileset._payloads> <#assign payloads = the_image.fileset._payloads>
<#if payloads?size!=0> <#if payloads?size!=0>
<#-- Getting the first payload --> <#-- Getting the first payload -->
<#assign payload = payloads[0]> <#assign payload = payloads[0]>
<@assignResource name=payload._name url=payload._link description=the_image.didascalia format=payload._mimetype></@assignResource> <@assignResource name=payload._name url=payload._link description=the_image.didascalia format=payload._mimetype></@assignResource>
</#if> </#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#assign payloads = theDocument.immaginiRappresentative[0].fileset._payloads>
<#if payloads?size!=0>
<#-- Getting the first payload -->
<#assign payload = payloads[0]>
<@assignResource name=payload._name url=payload._link description=theDocument.immaginiRappresentative[0].didascalia format=payload._mimetype></@assignResource>
</#if>
</#if> </#if>
<#-- Building Resources --> <#-- Building Resources -->
@ -245,6 +238,11 @@
<#-- Mapping extras fields --> <#-- Mapping extras fields -->
<#-- profiled-concessioni -->
<#if theDocument.doi??>
<@assignExtraField key="DOI" value=theDocument.doi asObject=false></@assignExtraField>
</#if>
<#if theDocument.contributore??> <#if theDocument.contributore??>
<@assignExtraField key="Contributore" value=theDocument.contributore asObject=false></@assignExtraField> <@assignExtraField key="Contributore" value=theDocument.contributore asObject=false></@assignExtraField>
</#if> </#if>
@ -257,10 +255,16 @@
<@assignExtraField key="Ente responsabile del progetto" value=theDocument.editore asObject=false></@assignExtraField> <@assignExtraField key="Ente responsabile del progetto" value=theDocument.editore asObject=false></@assignExtraField>
</#if> </#if>
<#-- profiled-concessioni -->
<#if theDocument.ufficioMic??> <#if theDocument.ufficioMic??>
<@assignExtraField key="Ufficio MiC competente per territorio" value=theDocument.ufficioMic asObject=false></@assignExtraField> <@assignExtraField key="Ufficio MiC competente per territorio" value=theDocument.ufficioMic asObject=false></@assignExtraField>
</#if> </#if>
<#-- concessioni-estere -->
<#if theDocument.ufficioCompetente??>
<@assignExtraField key="Ufficio estero competente per territorio" value=theDocument.ufficioCompetente asObject=false></@assignExtraField>
</#if>
<#if theDocument.funzionarioResponsabile??> <#if theDocument.funzionarioResponsabile??>
<@assignExtraField key="Funzionario Responsabile" value=theDocument.funzionarioResponsabile asObject=false></@assignExtraField> <@assignExtraField key="Funzionario Responsabile" value=theDocument.funzionarioResponsabile asObject=false></@assignExtraField>
</#if> </#if>

View File

@ -177,25 +177,18 @@
<#-- Mapping "Immagine Rappresentative" as resource --> <#-- Mapping "Immagine Rappresentative" as resource -->
<#if theDocument.immaginiRappresentative??> <#if theDocument.immaginiRappresentative??>
<#if theDocument.immaginiRappresentative?is_sequence && theDocument.immaginiRappresentative?size gt 0> <#if theDocument.immaginiRappresentative?is_sequence && theDocument.immaginiRappresentative?size gt 0>
<#list theDocument.immaginiRappresentative as the_image> <#list theDocument.immaginiRappresentative as the_image>
<#if the_image.fileset?? && the_image.fileset._payloads??> <#if the_image.fileset?? && the_image.fileset._payloads??>
<#assign payloads = the_image.fileset._payloads> <#assign payloads = the_image.fileset._payloads>
<#if payloads?size!=0> <#if payloads?size!=0>
<#-- Getting the first payload --> <#-- Getting the first payload -->
<#assign payload = payloads[0]> <#assign payload = payloads[0]>
<@assignResource name=payload._name url=payload._link description=the_image.didascalia format=payload._mimetype></@assignResource> <@assignResource name=payload._name url=payload._link description=the_image.didascalia format=payload._mimetype></@assignResource>
</#if> </#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#assign payloads = theDocument.immaginiRappresentative[0].fileset._payloads>
<#if payloads?size!=0>
<#-- Getting the first payload -->
<#assign payload = payloads[0]>
<@assignResource name=payload._name url=payload._link description=theDocument.immaginiRappresentative[0].didascalia format=payload._mimetype></@assignResource>
</#if>
</#if> </#if>
<#-- Building Resources --> <#-- Building Resources -->
@ -245,6 +238,11 @@
<#-- Mapping extras fields --> <#-- Mapping extras fields -->
<#-- profiled-concessioni -->
<#if theDocument.doi??>
<@assignExtraField key="DOI" value=theDocument.doi asObject=false></@assignExtraField>
</#if>
<#if theDocument.contributore??> <#if theDocument.contributore??>
<@assignExtraField key="Contributore" value=theDocument.contributore asObject=false></@assignExtraField> <@assignExtraField key="Contributore" value=theDocument.contributore asObject=false></@assignExtraField>
</#if> </#if>
@ -257,10 +255,16 @@
<@assignExtraField key="Ente responsabile del progetto" value=theDocument.editore asObject=false></@assignExtraField> <@assignExtraField key="Ente responsabile del progetto" value=theDocument.editore asObject=false></@assignExtraField>
</#if> </#if>
<#-- profiled-concessioni -->
<#if theDocument.ufficioMic??> <#if theDocument.ufficioMic??>
<@assignExtraField key="Ufficio MiC competente per territorio" value=theDocument.ufficioMic asObject=false></@assignExtraField> <@assignExtraField key="Ufficio MiC competente per territorio" value=theDocument.ufficioMic asObject=false></@assignExtraField>
</#if> </#if>
<#-- concessioni-estere -->
<#if theDocument.ufficioCompetente??>
<@assignExtraField key="Ufficio estero competente per territorio" value=theDocument.ufficioCompetente asObject=false></@assignExtraField>
</#if>
<#if theDocument.funzionarioResponsabile??> <#if theDocument.funzionarioResponsabile??>
<@assignExtraField key="Funzionario Responsabile" value=theDocument.funzionarioResponsabile asObject=false></@assignExtraField> <@assignExtraField key="Funzionario Responsabile" value=theDocument.funzionarioResponsabile asObject=false></@assignExtraField>
</#if> </#if>