Wiki source code of DocsManageChildPages
Last modified by Eugen Colesnicov on 2013/03/24 06:00
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{velocity}} | ||
2 | {{html wiki="true"}} | ||
3 | $xwiki.ssfx.use("js/xwiki/table/table.css") | ||
4 | $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true) | ||
5 | |||
6 | #set($no=0) | ||
7 | #foreach($child in $xwiki.searchDocuments("where doc.parent='$doc' order by doc.date desc")) | ||
8 | #if($no==0) #set($no=1) #end | ||
9 | #set($childDoc = $xwiki.getDocument($child)) | ||
10 | #if($no==1) | ||
11 | (% class="grid sortable filterable doOddEven" id="tableid" %) | ||
12 | (% class="sortHeader" %)|=Pagina|=Autor|=Data modif.|=Actiuni | ||
13 | #end | ||
14 | |**(% style="font-size: 12px; " %)[[$childDoc.getDisplayTitle()>>$child]]**|(% style="font-size: 12px; " %)$xwiki.getUserName($childDoc.getAuthor())|(% style="font-size: 12px; " %)$datetool.format('dd/MM/yyyy',$childDoc.getDate())|<a href="$xwiki.getURL($child, 'edit')" title="Edit"> | ||
15 | <img src="$xwiki.getSkinFile('icons/silk/pencil.gif')" alt="edit icon"/></a><a href="$xwiki.getURL($child, 'delete')" title="Delete" target="_blank"><img src="$xwiki.getSkinFile('icons/silk/cross.gif')" alt="delete icon"/</a> | ||
16 | #set($no=$no+1) | ||
17 | #end | ||
18 | |||
19 | #if($no==0) | ||
20 | (% style="color: rgb(153, 153, 153); font-size: 12px; " %)$msg.get("corr.docs.message.noChildPages") | ||
21 | #end | ||
22 | |||
23 | <div> | ||
24 | <form method="post" action="$doc.getURL('create')" onsubmit="cancelCancelEdit()"> | ||
25 | <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" /> | ||
26 | <input type="hidden" name="tocreate" value="page"/> | ||
27 | |((( | ||
28 | #set($space = $doc.documentReference.lastSpaceReference.name) | ||
29 | <input type="hidden" id="$spaceInputId" name="space" value="$!space"/> | ||
30 | )))|((( | ||
31 | #set($pageInputId = "page$!{panelId}") | ||
32 | ## <label for="$pageInputId">$msg.get('core.create.page')</label> | ||
33 | )))|((( | ||
34 | #set($pageText = $msg.get('core.create.pageText')) | ||
35 | <input type="text" id="$pageInputId" name="page" value="$pageText" onfocus="if(this.value=='$pageText') this.value=''" onblur="if(this.value=='') this.value='$pageText'"/> | ||
36 | )))|((( | ||
37 | #set($parent = $services.model.serialize($doc.documentReference, "local")) | ||
38 | <input type="hidden" name="parent" value="$!parent"/> | ||
39 | <input type="submit" class="button" value="$msg.get('create')"/> | ||
40 | </form> | ||
41 | </div> | ||
42 | |||
43 | {{/html}} | ||
44 | {{/velocity}} |