Hide last authors
Alexandru Colesnicov 2.1 1 {{velocity}}
Alexandru Colesnicov 3.1 2
3 #if("$!request.docName" != '')
4 ## Request for creating a new instance
5 #set($docName = ${request.docName})
6 #set($targetDocName = "${request.spaceName}.${docName}")
7 #if(!$xwiki.exists($targetDocName) && $xwiki.hasAccessLevel('edit', $xcontext.user, $targetDocName))
Alexandru Colesnicov 5.1 8 $response.sendRedirect($xwiki.getURL($targetDocName, 'inline', "template=${escapetool.url($request.template)}&title=${request.docName}&parent=${escapetool.url($request.parent)}"))
Alexandru Colesnicov 3.1 9 ## Stop processing, since we already sent a redirect.
10 #stop
11 #end
12 #end
13
Alexandru Colesnicov 7.1 14 {{/velocity}}
15
Alexandru Colesnicov 6.1 16 {{python}}
17 import sys
18 print sys.path
19 {{/python}}
20
Alexandru Colesnicov 7.1 21 {{velocity}}
22
Alexandru Colesnicov 3.1 23 = Add a new record =
24
25 #if("$!targetDocName" != '' && $xwiki.exists($targetDocName))
26 {{warning}}The target document already exists. Please choose a different name, or [[view the existing document>>$targetDocName]]{{/warning}}
27 #elseif("$!targetDocName" != '')
28 {{warning}}You don't have permission to create that document{{/warning}}
29 #end
30
31 {{html}}
32 <form action="" id="newdoc" method="post">
33 <div>
34 <input type="hidden" name="parent" value="${doc.fullName}"/>
35 <input type="hidden" name="template" value="Duncan1.Code.GDataTemplate"/>
36 <input type="hidden" name="sheet" value="1"/>
37 <input type="hidden" name="spaceName" value="Duncan1"/>
38 Document: <input type="text" name="docName" value="Enter profession name here" class="withTip" size="50"/>
39 <span class="buttonwrapper"><input type="submit" value="Create this record" class="button"/></span>
40 </div>
41 </form>
42 {{/html}}
43
44
Alexandru Colesnicov 2.1 45 #set ($columnsProperties = {
46 'doc.title': {"link":"view"},
47 'QuaWoman': {"filterable":true,"sortable":true},
48 'QuaMan': {"filterable":true,"sortable":true},
49 'doc.author': {"link":"author"},
50 '_actions': {"sortable":false,"filterable":false,"html":true,"actions":["edit","delete"]}
51 })
52 #set ($options = {
53 'className': 'Duncan1.Code.GDataClass',
54 'translationPrefix': 'Duncan1.livetable.',
55 'rowCount': 15,
56 'maxPages': 10,
57 'selectedColumn': 'doc.title',
58 'defaultOrder': 'asc'
59 })
60 #set ($columns = ['doc.title', 'QuaWoman', 'QuaMan', 'doc.author', '_actions'])
61 #livetable('Duncan1' $columns $columnsProperties $options)
62 {{/velocity}}

Tips

You can click on the arrows next to the breadcrumb elements to quickly navigate to sibling and children pages.

Need help?

If you need help with XWiki you can contact: