AnsweredAssumed Answered

Show Details button in a custom view

Question asked by spust on May 21, 2007
Latest reply on May 24, 2007 by lexxborg
I am trying to adjust a custom view template to my needs and get stuck on the problem on how to show the action buttons to edit, show details, check out and deletion of a document, like the buttons shown on the right side in the standard view.

I tried the following code, but the part

<a href='#' onclick="document.forms['browse']['browse:act'].value='browse:details_doc_id_216';document.forms['browse']['id'].value='${child.properties.node-uuid}';document.forms['browse'].submit();return false;"

does not work. The part ${child.properties.node-uuid} is not replaced with the uuid by the parser. Do I need to enter any escape characters or something else like

" + ${child.properties.node-uuid} +"

Here is the complete code of my template:

<table>
   <tr>
      <td></td>
      <td><b>Name</b></td>
      <td><b>Title</b></td>
      <td><b>Description</b></td>
      <td><b>Created</b></td>     
      <td><b>Modified</b></td>
      <td><b>Size</b></td>
      <td><b>Locked</b></td>
      <td><b>Details</b></td>
   </tr>
   <#list space.childrenByXPath[".//*[subtypeOf('cm:content')]"] 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.properties.title}</td>
            <td>${child.properties.description}</td>
            <td>${child.properties.created?date}</td>           
            <td>${child.properties.modified?date}</td>
            <td>${(child.size / 1000)?string("0.##")} KB</td>
            <td> <#if child.isLocked>Yes</#if></td>
            <td><a href='#' onclick="document.forms['browse']['browse:act'].value='browse:details_doc_id_216';document.forms['browse']['id'].value='${child.properties.node-uuid}';document.forms['browse'].submit();return false;" id="details_doc_id_216" class=inlineAction><img src="/alfresco/images/icons/View_details.gif" border=0 alt="Details ansehen" title="Details ansehen" align=absmiddle></a><a href='#' </td>
         </tr>
      </#if>
   </#list>
</table>

Is it possible to show the  edit, show details, check out and delete buttons in a custom view? Has anybody an idea?

thanks in advance,

Simon

Outcomes