diff --git a/src/main/resources/freemarker/Fishery.ftl b/src/main/resources/freemarker/Fishery.ftl index 403848a..1f1d734 100644 --- a/src/main/resources/freemarker/Fishery.ftl +++ b/src/main/resources/freemarker/Fishery.ftl @@ -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"}] > @@ -83,7 +82,6 @@ "title": "${group.title}" }, - <#-- <@groupFromRefersTo var=refers_to /> --> <@group name="fishery-group" title="Fishery" var="OK" sep=""/> ], "tags": [ diff --git a/src/main/resources/freemarker/Stock.ftl b/src/main/resources/freemarker/Stock.ftl index 60b0a05..f7166e3 100644 --- a/src/main/resources/freemarker/Stock.ftl +++ b/src/main/resources/freemarker/Stock.ftl @@ -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}"}] > + + <@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"}] > + <@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}" }, - <#-- <@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=""/> diff --git a/src/main/resources/freemarker/macros.ftl b/src/main/resources/freemarker/macros.ftl index 275715c..99d010c 100644 --- a/src/main/resources/freemarker/macros.ftl +++ b/src/main/resources/freemarker/macros.ftl @@ -21,19 +21,6 @@ -<#-- -<#macro groupFromRefersTo var="" include=true sep=","> - <#if var?has_content && include> - <#list var as elem> - { - TODO neeed a Switch case - "name": "${elem.name}" - }${sep} - - - ---> - <#macro tag tagname="" include=true sep=","> <#if tagname?has_content && include> <@tagbyvalue value=tagname include=include sep=sep />