From 8977aaa12e9a29f21f035ee181c28b02fd8776be Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Tue, 17 Apr 2007 14:42:16 +0000 Subject: [PATCH] Document Info example template now displays the target associations for a document. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5503 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../templates/content/examples/doc_info.ftl | 60 +++++++++++-------- .../templates/content_template_examples.xml | 2 +- 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/config/alfresco/templates/content/examples/doc_info.ftl b/config/alfresco/templates/content/examples/doc_info.ftl index 2821edeeee..72e4a2716a 100644 --- a/config/alfresco/templates/content/examples/doc_info.ftl +++ b/config/alfresco/templates/content/examples/doc_info.ftl @@ -12,35 +12,45 @@ Aspects: - <#list document.aspects as aspect> - - + <#list document.aspects as aspect> + + +
${aspect}
${aspect}
+ Assocs: + + <#list document.assocs?keys as key> + +
${key} + <#list document.assocs[key] as t> + ${t.displayPath}/${t.name}
+ +
Properties: - <#-- Get a list of all the property names for the document --> - <#assign props = document.properties?keys> - <#list props as t> - <#-- If the property exists --> - <#if document.properties[t]?exists> - <#-- If it is a date, format it accordingly --> - <#if document.properties[t]?is_date> - - - <#-- If it is a boolean, format it accordingly --> - <#elseif document.properties[t]?is_boolean> - - - <#-- If it is a collection, enumerate it --> - <#elseif document.properties[t]?is_enumerable> - - - <#-- Otherwise treat it as a string --> - <#else> - + <#-- Get a list of all the property names for the document --> + <#assign props = document.properties?keys> + <#list props as t> + <#-- If the property exists --> + <#if document.properties[t]?exists> + <#-- If it is a date, format it accordingly --> + <#if document.properties[t]?is_date> + + + <#-- If it is a boolean, format it accordingly --> + <#elseif document.properties[t]?is_boolean> + + + <#-- If it is a collection, enumerate it --> + <#elseif document.properties[t]?is_enumerable> + + + <#-- Otherwise treat it as a string --> + <#else> + + - - +
${t} = ${document.properties[t]?datetime}
${t} = ${document.properties[t]?string("yes", "no")}
${t} = <#list document.properties[t] as i>${i}
${t} = ${document.properties[t]}
${t} = ${document.properties[t]?datetime}
${t} = ${document.properties[t]?string("yes", "no")}
${t} = <#list document.properties[t] as i>${i}
${t} = ${document.properties[t]}
<#else> No document found! diff --git a/config/alfresco/templates/content_template_examples.xml b/config/alfresco/templates/content_template_examples.xml index c5947af0cb..37c18bdfa4 100644 --- a/config/alfresco/templates/content_template_examples.xml +++ b/config/alfresco/templates/content_template_examples.xml @@ -8,7 +8,7 @@ true Displays useful information about the current document - contentUrl=classpath:alfresco/templates/content/examples/doc_info.ftl|mimetype=text/plain|size=1884|encoding=UTF-8 + contentUrl=classpath:alfresco/templates/content/examples/doc_info.ftl|mimetype=text/plain|size=2227|encoding=UTF-8 doc_info.ftl doc_info.ftl