Fixed template

This commit is contained in:
Luca Frosini 2024-04-03 12:10:35 +02:00
parent 67f7aed1c2
commit eabbd9968c
3 changed files with 10 additions and 21 deletions

View File

@ -28,14 +28,13 @@
<@metadatalist key="Species" namespace=identity_namespace list=species tagValues=true/>
<@metadatalist key="Similar GRSF Record" namespace=identity_namespace list=similar_grsf_record />
<@metadatalist key="Connected Stock Record" namespace=identity_namespace list=connected />
<@metadatalist key="Data Owner" namespace=data_namespace list=data_owner include=include_sensitive />
<@timeseries key="Catch" namespace=data_namespace timeseries="catches" groupname="catch-group" />
<@timeseries key="Landing" namespace=data_namespace timeseries="landings" groupname="landing-group" />
<#if sdg_flag??>
<@metadata key="SDG Flag" var=sdg_flag?c />
<@metadata key="SDG Flag" var=sdg_flag?c />
<#if sdg_flag>
<#assign group_list += [{"name":"grsf-sdg-flag-group", "title":"GRSF SDG Flag"}] >
</#if>
@ -83,7 +82,6 @@
"title": "${group.title}"
},
</#list>
<#-- <@groupFromRefersTo var=refers_to /> -->
<@group name="fishery-group" title="Fishery" var="OK" sep=""/>
],
"tags": [

View File

@ -15,10 +15,15 @@
"extras": [
<#-- START of Common Metadata -->
<@metadata key="GRSF Type" namespace=identity_namespace var=grsf_type?capitalize />
<@metadata key="Short Name" namespace=identity_namespace var=short_name />
<#if database_sources??>
<@metadatalist key="Database Source" namespace=identity_namespace list=database_sources />
<#if include_sensitive>
<#-- We are in Administrative VRE e.g. GRSF_Admin -->
<#list database_sources as database_source>
<#assign group_list += [{"name":"${database_source_name_to_id[database_source?json_string]}-group", "title":"${database_source?json_string}"}] >
</#list>
</#if>
</#if>
<@metadatalist key="Species" namespace=identity_namespace list=species tagValues=true/>
<@metadatalist key="Similar GRSF Record" namespace=identity_namespace list=similar_grsf_record />
@ -28,13 +33,13 @@
<@timeseries key="Catch" namespace=data_namespace timeseries="catches" groupname="catch-group" />
<@timeseries key="Landing" namespace=data_namespace timeseries="landings" groupname="landing-group" />
<#if sdg_flag??>
<@metadata key="SDG Flag" var=sdg_flag?c />
<#if sdg_flag>
<#assign group_list += [{"name":"grsf-sdg-flag-group", "title":"GRSF SDG Flag"}] >
</#if>
</#if>
<@metadata key="Status of the Record" var=status_grsf_record />
<@metadata key="spatial" var=spatial />
<@metadata key="Domain" var="Stock" />
@ -60,7 +65,7 @@
<@timeseries key="Scientific Advice" namespace=data_namespace timeseries="scientific_advice" groupname="scientific-advice-group" />
<@metadata key="Assessor" namespace=data_namespace var=assessor include=include_sensitive />
<#-- END of Stock Metadata -->
<@metadata key="Record URL" var=record_url />
<#if source = "grsf">
@ -77,7 +82,6 @@
"title": "${group.title}"
},
</#list>
<#-- <@groupFromRefersTo var=refers_to /> -->
<@group name="assessment-method-group" title="Assessment Method" var=assessment_methods />
<@group name="scientific-advice-group" title="Scientific Advice" var=scientific_advice />
<@group name="stock-group" title="Stock" var="OK" sep=""/>

View File

@ -21,19 +21,6 @@
</#if>
</#macro>
<#--
<#macro groupFromRefersTo var="" include=true sep=",">
<#if var?has_content && include>
<#list var as elem>
{
TODO neeed a Switch case
"name": "${elem.name}"
}${sep}
</#list>
</#if>
</#macro>
-->
<#macro tag tagname="" include=true sep=",">
<#if tagname?has_content && include>
<@tagbyvalue value=tagname include=include sep=sep />