booklet.ftl 2.64 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
<#macro isPublished published what>
	<#if published>

	<#else>
		<div class="alert not-published"><b>Note:</b> This ${what} is not published.</div><#lt>
	</#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>
32
		# ${descriptor.title} <#if descriptor.uom??>`[${descriptor.uom}]`</#if><#lt>
33 34 35 36 37 38 39 40 41

		<@isPublished published=descriptor.published what="descriptor" />

		<#if descriptor.description??>
			${descriptor.description}<#lt>
		<#else>
			> No description.<#lt>
		</#if>

42 43 44 45 46
		Classification: **`${descriptor.category}`**  <#lt>
		Data type: **`${descriptor.dataType}`** <#if descriptor.uom??> measured in **`${descriptor.uom}`**.</#if><#lt>
		<#if descriptor.dataType=='NUMERIC' || descriptor.dataType=='SCALE'>
		Range: **`<#if descriptor.minValue??>${descriptor.minValue}<#else>any</#if>..<#if descriptor.maxValue??>${descriptor.maxValue}<#else>any</#if>`**<#lt>
		</#if>
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65

		<#list descriptor.terms>
			<#compress>
				|Code|Term|Description|
				|---|---|---|
				<#items as term>
					|**${term.code}**|${term.title}|${term.description!}|
				</#items>
			</#compress>
		</#list>

		<#if descriptor.vocabulary??>
			<@printVocabulary vocabulary=descriptor.vocabulary />
		</#if>
</#macro>

<div class="documenttitle">
	${descriptorList.title} <#lt>
<div><small>
66
	${descriptorList.versionTag},<#lt>
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
	<#if descriptorList.publisher??>
	**${descriptorList.publisher}**  <#lt>
	<#else>
	${descriptorList.owner.name}  <#lt>
	</#if>
</small></div>
</div>

${descriptorList.description!}

<@isPublished published=descriptorList.published what="descriptor list" />


<#if descriptorList.publisher??>
Published by: **${descriptorList.publisher}**  <#lt>
<#else>
83
Maintained by: **${descriptorList.owner.name}**  <#lt>
84
</#if>
85 86 87 88 89 90
Version: **${descriptorList.versionTag}**<#lt>

**Genesys metadata**  
Last modified: **${descriptorList.lastModifiedDate?date}**  <#lt>
Date registered: **${descriptorList.createdDate?date}**  <#lt>
Genesys record identifier: **${descriptorList.uuid} v${descriptorList.version}**  <#lt>
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105


<#list descriptorList.descriptors>

	<#items as descriptor>

		<@printDescriptor descriptor=descriptor />

	</#items>

<#else>

> The descriptor list does not declare any descriptors.

</#list>