mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Moving to root below branch label
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2005 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
20
config/alfresco/templates/content/examples/company_logos.ftl
Normal file
20
config/alfresco/templates/content/examples/company_logos.ftl
Normal file
@@ -0,0 +1,20 @@
|
||||
<#-- Table of the images found in a folder under Company Home called "Company Logos" -->
|
||||
<#-- Shows each image found as inline content -->
|
||||
<table>
|
||||
<#list companyhome.children as child>
|
||||
<#if child.isContainer && child.name = "Company Logos">
|
||||
<#list child.children as image>
|
||||
<#switch image.mimetype>
|
||||
<#case "image/jpeg">
|
||||
<#case "image/gif">
|
||||
<#case "image/png">
|
||||
<tr>
|
||||
<td><img src="/alfresco${image.url}"></td>
|
||||
</tr>
|
||||
<#break>
|
||||
<#default>
|
||||
</#switch>
|
||||
</#list>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
17
config/alfresco/templates/content/examples/doc_info.ftl
Normal file
17
config/alfresco/templates/content/examples/doc_info.ftl
Normal file
@@ -0,0 +1,17 @@
|
||||
<#-- Shows some general info about the current document, including NodeRef and aspects applied -->
|
||||
<h3>=====Template Start=====</h3>
|
||||
|
||||
<h4>Current Document Info:</h4>
|
||||
<b>Name:</b> ${document.name}<br>
|
||||
<b>Ref:</b> ${document.nodeRef}<br>
|
||||
<b>Type:</b> ${document.type}<br>
|
||||
<b>Content URL:</b> <a href="/alfresco${document.url}">/alfresco${document.url}</a><br>
|
||||
<b>Locked:</b> <#if document.isLocked>Yes<#else>No</#if><br>
|
||||
<b>Aspects:</b>
|
||||
<table>
|
||||
<#list document.aspects as aspect>
|
||||
<tr><td>${aspect}</td></tr>
|
||||
</#list>
|
||||
</table>
|
||||
|
||||
<h3>=====Template End=====</h3>
|
47
config/alfresco/templates/content/examples/example.ftl
Normal file
47
config/alfresco/templates/content/examples/example.ftl
Normal file
@@ -0,0 +1,47 @@
|
||||
<h3>=====Example Template Start=====</h3>
|
||||
|
||||
<b>Company Home Space:</b> ${companyhome.properties.name}
|
||||
<br>
|
||||
<b>My Home Space:</b> ${userhome.properties.name}
|
||||
<br>
|
||||
<b>Company Home children count:</b> ${companyhome.children?size}
|
||||
<br>
|
||||
<b>Company Home first child node name:</b> ${companyhome.children[0].properties.name}
|
||||
<br>
|
||||
<b>Current Document Name:</b> ${document.name}
|
||||
<br>
|
||||
<b>Current Space Name:</b> ${space.name}
|
||||
|
||||
<h4>List of child spaces in my Home Space:</h4>
|
||||
<table>
|
||||
<#list userhome.children as child>
|
||||
<#if child.isContainer>
|
||||
<tr>
|
||||
<td><img src="/alfresco${child.icon32}"></td>
|
||||
<td><b>${child.properties.name}</b> (${child.children?size})</td>
|
||||
<td><b>Path:</b> ${child.displayPath}</td>
|
||||
</tr>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
||||
|
||||
<h4>List of docs in my Home Space (text only content shown inline, JPG images shown as thumbnails):</h4>
|
||||
<table>
|
||||
<#list userhome.children as child>
|
||||
<#if child.isDocument>
|
||||
<tr><td><img src="/alfresco${child.icon16}"></td><td><a href="/alfresco${child.url}">${child.properties.name}</a></td></tr>
|
||||
<#if child.mimetype = "text/plain">
|
||||
<tr><td></td><td>${child.content}</td></tr>
|
||||
<#elseif child.mimetype = "image/jpeg">
|
||||
<tr><td></td><td><img width=100 height=65 src="/alfresco${child.url}"></td></tr>
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
||||
|
||||
<h4>Assoc example:</h4>
|
||||
<#if userhome.children[0].assocs["cm:contains"]?exists>
|
||||
${userhome.children[0].assocs["cm:contains"][0].name}
|
||||
</#if>
|
||||
|
||||
<h3>=====Example Template End=====</h3>
|
10
config/alfresco/templates/content/examples/localizable.ftl
Normal file
10
config/alfresco/templates/content/examples/localizable.ftl
Normal file
@@ -0,0 +1,10 @@
|
||||
<#-- Shows if a document is localizable and the locale if set -->
|
||||
<b>Localisable:</b>
|
||||
<#if hasAspect(document, "cm:localizable") = 1>
|
||||
Yes<br>
|
||||
<#if document.properties.locale?exists>
|
||||
Locale: ${document.properties.locale.properties.name}
|
||||
</#if>
|
||||
<#else>
|
||||
No<br>
|
||||
</#if>
|
20
config/alfresco/templates/content/examples/my_docs.ftl
Normal file
20
config/alfresco/templates/content/examples/my_docs.ftl
Normal file
@@ -0,0 +1,20 @@
|
||||
<#-- Table of the documents in my Home Space -->
|
||||
<#-- Shows the Icon and link to the content for the doc, also the size in KB and lock status -->
|
||||
<table>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>Name</b></td>
|
||||
<td><b>Size</b></td>
|
||||
<td><b>Locked</b></td>
|
||||
</tr>
|
||||
<#list userhome.children as child>
|
||||
<#if child.isDocument>
|
||||
<tr>
|
||||
<td><a href="/alfresco${child.url}" target="new"><img src="/alfresco${child.icon16}" border=0></a></td>
|
||||
<td><a href="/alfresco${child.url}" target="new">${child.properties.name}</a></td>
|
||||
<td>${(child.size / 1000)?string("0.##")} KB</td>
|
||||
<td> <#if child.isLocked>Yes</#if></td>
|
||||
</tr>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
@@ -0,0 +1,22 @@
|
||||
<#-- Displays a table of all the documents from a "Press Releases" folder under Company Home -->
|
||||
<#-- Obviously this folder needs to exist and the docs in it should have the title and description fields set -->
|
||||
<table>
|
||||
<#list companyhome.children as child>
|
||||
<#if child.isContainer && child.name = "Press Releases">
|
||||
<#list child.children as doc>
|
||||
<#if doc.isDocument>
|
||||
<tr>
|
||||
<td><h3>${doc.properties.title}</h3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left:4px"><b>${doc.properties.description}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left:8px"><small>${doc.content}</small></td>
|
||||
</tr>
|
||||
<tr><td><div style="padding:6px"></div></td></tr>
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
15
config/alfresco/templates/content/examples/my_spaces.ftl
Normal file
15
config/alfresco/templates/content/examples/my_spaces.ftl
Normal file
@@ -0,0 +1,15 @@
|
||||
<#-- Table of the Spaces in my Home Folder -->
|
||||
<#-- Shows the large 32x32 pixel icon, and generates an external access servlet URL to the space -->
|
||||
<table>
|
||||
<#list userhome.children as child>
|
||||
<#if child.isContainer>
|
||||
<tr>
|
||||
<td><img src="/alfresco${child.icon32}"></td>
|
||||
<#assign ref=child.nodeRef>
|
||||
<#assign workspace=ref[0..ref?index_of("://")-1]>
|
||||
<#assign storenode=ref[ref?index_of("://")+3..]>
|
||||
<td><a href="/alfresco/navigate/showSpaceDetails/${workspace}/${storenode}"><b>${child.properties.name}</b></a> (${child.children?size})</td>
|
||||
</tr>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
@@ -0,0 +1,8 @@
|
||||
<#-- Table of some summary details about the current user -->
|
||||
<table>
|
||||
<tr><td><b>Name:</b></td> <td>${person.properties.firstName} ${person.properties.lastName}</td></tr>
|
||||
<tr><td><b>User:</b></td> <td>${person.properties.userName}</td></tr>
|
||||
<tr><td><b>Home Space location:</b></td> <td>${userhome.displayPath}/${userhome.name}</td></tr>
|
||||
<tr><td><b>Items in Home Space:</b></td> <td>${userhome.children?size}</td></tr>
|
||||
<tr><td><b>Items in Company Space:</b></td> <td>${companyhome.children?size}</td></tr>
|
||||
</table>
|
12
config/alfresco/templates/content/examples/translatable.ftl
Normal file
12
config/alfresco/templates/content/examples/translatable.ftl
Normal file
@@ -0,0 +1,12 @@
|
||||
<#-- Shows the translations applied to a doc through the translatable aspect -->
|
||||
<b>Translatable:</b>
|
||||
<#if hasAspect(document, "cm:translatable") = 1>
|
||||
Yes<br>
|
||||
<table>
|
||||
<#list document.assocs["cm:translations"] as t>
|
||||
<tr><td>${t.content}</td></tr>
|
||||
</#list>
|
||||
</table>
|
||||
<#else>
|
||||
No<br>
|
||||
</#if>
|
15
config/alfresco/templates/content/examples/userhome_docs.ftl
Normal file
15
config/alfresco/templates/content/examples/userhome_docs.ftl
Normal file
@@ -0,0 +1,15 @@
|
||||
<#-- List of docs in the Home Space for current user -->
|
||||
<#-- If the doc mimetype is plain/text then the content is shown inline -->
|
||||
<#-- If the doc mimetype is JPEG then the image is shown inline as a small thumbnail image -->
|
||||
<table>
|
||||
<#list userhome.children as child>
|
||||
<#if child.isDocument>
|
||||
<tr><td>${child.properties.name}</td></tr>
|
||||
<#if child.mimetype = "text/plain">
|
||||
<tr><td style='padding-left:16px'>${child.content}</td></tr>
|
||||
<#elseif child.mimetype = "image/jpeg">
|
||||
<tr><td style='padding-left:16px'><img width=100 height=65 src="/alfresco${child.url}"><td></tr>
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
Reference in New Issue
Block a user