mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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
This commit is contained in:
@@ -12,35 +12,45 @@
|
||||
</#if>
|
||||
<b>Aspects:</b>
|
||||
<table>
|
||||
<#list document.aspects as aspect>
|
||||
<tr><td>${aspect}</td></tr>
|
||||
</#list>
|
||||
<#list document.aspects as aspect>
|
||||
<tr><td>${aspect}</td></tr>
|
||||
</#list>
|
||||
</table>
|
||||
<b>Assocs:</b>
|
||||
<table>
|
||||
<#list document.assocs?keys as key>
|
||||
<tr><td>${key}</td><td>
|
||||
<#list document.assocs[key] as t>
|
||||
${t.displayPath}/${t.name}<br>
|
||||
</#list>
|
||||
</td></tr>
|
||||
</#list>
|
||||
</table>
|
||||
<b>Properties:</b>
|
||||
<table>
|
||||
<#-- 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>
|
||||
<tr><td>${t} = ${document.properties[t]?datetime}</td></tr>
|
||||
|
||||
<#-- If it is a boolean, format it accordingly -->
|
||||
<#elseif document.properties[t]?is_boolean>
|
||||
<tr><td>${t} = ${document.properties[t]?string("yes", "no")}</td></tr>
|
||||
|
||||
<#-- If it is a collection, enumerate it -->
|
||||
<#elseif document.properties[t]?is_enumerable>
|
||||
<tr><td>${t} = <#list document.properties[t] as i>${i} </#list></td></tr>
|
||||
|
||||
<#-- Otherwise treat it as a string -->
|
||||
<#else>
|
||||
<tr><td>${t} = ${document.properties[t]}</td></tr>
|
||||
<#-- 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>
|
||||
<tr><td>${t} = ${document.properties[t]?datetime}</td></tr>
|
||||
|
||||
<#-- If it is a boolean, format it accordingly -->
|
||||
<#elseif document.properties[t]?is_boolean>
|
||||
<tr><td>${t} = ${document.properties[t]?string("yes", "no")}</td></tr>
|
||||
|
||||
<#-- If it is a collection, enumerate it -->
|
||||
<#elseif document.properties[t]?is_enumerable>
|
||||
<tr><td>${t} = <#list document.properties[t] as i>${i} </#list></td></tr>
|
||||
|
||||
<#-- Otherwise treat it as a string -->
|
||||
<#else>
|
||||
<tr><td>${t} = ${document.properties[t]}</td></tr>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
</#list>
|
||||
</table>
|
||||
<#else>
|
||||
No document found!
|
||||
|
Reference in New Issue
Block a user