cancel
Showing results for 
Search instead for 
Did you mean: 

'Who's checked out what?'

dfarbey
Champ in-the-making
Champ in-the-making
(I'm a newbie to this forum and to Alfresco, please be kind!)

Is there an easy way of finding out which users have checked out which files from a given space and its sub-spaces?

Thanks

David Farbey
London, UK
1 REPLY 1

kevinr
Star Contributor
Star Contributor
It is possible to write a template that can do this:
http://wiki.alfresco.com/wiki/Template_Guide

Template can be applied to a space as a Custom View in the Space Details screen (which means it has the current folder context available to the template). Or they can be executed via URL:
http://wiki.alfresco.com/wiki/URL_Addressability#TemplateContentServlet

Here is an example template that displays the checked out documents for the current user, it should get you started:

<#– Table of the documents checked out to the current user –>
<#– Shows the Icon and link to the content for the doc, also the size in KB and modified date –>
<#assign query="@cm\\:lockOwner:${person.properties.userName}">
<#assign rowcount=0>
<table>
   <tr style='background-color: #C6D8EB'>
      <td></td>
      <td><b>Name</b></td>
      <td><b>Size</b></td>
      <td><b>Modified Date</b></td>
      <td><b>Location</b></td>
   </tr>
   <#list userhome.childrenByLuceneSearch[query] as child>
      <#if child.isDocument>
         <#if rowcount % 2 = 0><tr><#else><tr style='background-color: #DEE5EC'></#if>
            <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>${child.properties.modified?datetime}</td>
            <td>${child.displayPath}</td>
         </tr>
         <#assign rowcount=rowcount+1>
      </#if>
   </#list>
</table>
Hope this helps,

Kevin