Files
alfresco-community-repo/config/alfresco/templates/doc_versionhistory.ftl
Kevin Roast bd9f33e793 . Version History for a document now available in FreeMarker templating model
- new node API method:   document.versionHistory
 - returns a list of objects representing the version history of a document, such as name, created date, properties and content for the version
 - template example to show the version history for a document

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4763 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2007-01-09 13:26:19 +00:00

19 lines
808 B
Plaintext

<#-- Shows version history for the current document, with links to previous content versions -->
<#if document?exists>
<h3>Document Version History for: ${document.name}</h3>
<table cellspacing=4>
<tr align=left><th>Version</th><th>Name</th><th>Description</th><th>Created Date</th><th>Creator</th></tr>
<#list document.versionHistory as record>
<tr>
<td><a href="/alfresco${record.url}" target="new">${record.versionLabel}</a></td>
<td><a href="/alfresco${record.url}" target="new">${record.name}</a></td>
<td><#if record.description?exists>${record.description}</#if></td>
<td>${record.createdDate?datetime}</td>
<td>${record.creator}</td>
</tr>
</#list>
</table>
<#else>
No document found!
</#if>