Commit 4aac191a authored by Matija Obreza's avatar Matija Obreza
Browse files

HTML: Print controlled vocabulary description only the first time

parent 7cfab7b9
......@@ -6,6 +6,28 @@
</#if>
</#macro>
<#assign vocabprinted = { "dummy":true } />
<#macro printVocabulary vocabulary>
<#compress>
**Note:** This descriptor uses the **${vocabulary.title}** controlled vocabulary
<#if vocabulary.publisher??>
published by **${vocabulary.publisher}**
<#else>
maintained by **${vocabulary.owner.name}**
</#if>.
</#compress>
<#if vocabprinted[vocabulary.uuid]??>
<#else>
${vocabulary.description!}<#lt>
<#assign vocabprinted = vocabprinted + { vocabulary.uuid:true } />
</#if>
</#macro>
<#macro printDescriptor descriptor>
# ${descriptor.title} <#if descriptor.uom??>[${descriptor.uom}]</#if><#lt>
......@@ -29,18 +51,7 @@
</#list>
<#if descriptor.vocabulary??>
<#compress>
**Note:** This descriptor uses the **${descriptor.vocabulary.title}** controlled vocabulary
<#if descriptor.vocabulary.publisher??>
published by **${descriptor.vocabulary.publisher}**
<#else>
maintained by **${descriptor.vocabulary.owner.name}**
</#if>.
</#compress>
${descriptor.vocabulary.description!}<#lt>
<@printVocabulary vocabulary=descriptor.vocabulary />
</#if>
</#macro>
......
Supports Markdown
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