From version < 17.2 >
edited by Alexandru Colesnicov
on 2018/11/06 15:46
To version < 2.1 >
edited by Alexandru Colesnicov
on 2018/10/23 18:54
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,39 +1,4 @@
1 1  {{velocity}}
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))
8 - $response.sendRedirect($xwiki.getURL($targetDocName, 'inline', "template=${escapetool.url($request.template)}&title=${request.docName}&parent=${escapetool.url($request.parent)}"))
9 - ## Stop processing, since we already sent a redirect.
10 - #stop
11 - #end
12 -#end
13 -
14 -= Add a new record =
15 -
16 -#if("$!targetDocName" != '' && $xwiki.exists($targetDocName))
17 - {{warning}}The target document already exists. Please choose a different name, or [[view the existing document>>$targetDocName]]{{/warning}}
18 -#elseif("$!targetDocName" != '')
19 - {{warning}}You don't have permission to create that document{{/warning}}
20 -#end
21 -
22 -{{html}}
23 - <form action="" id="newdoc" method="post">
24 - <div>
25 - <input type="hidden" name="parent" value="${doc.fullName}"/>
26 - <input type="hidden" name="template" value="Duncan1.Code.GDataTemplate"/>
27 - <input type="hidden" name="sheet" value="1"/>
28 - <input type="hidden" name="spaceName" value="Duncan1"/>
29 - Document: <input type="text" name="docName" value="Enter profession name here" class="withTip" size="50"/>
30 - <span class="buttonwrapper"><input type="submit" value="Create this record" class="button"/></span>
31 - </div>
32 - </form>
33 -{{/html}}
34 -
35 -[[Duncan Result>>Duncan1.DuncanResult.WebHome]]
36 -
37 37  #set ($columnsProperties = {
38 38   'doc.title': {"link":"view"},
39 39   'QuaWoman': {"filterable":true,"sortable":true},
... ... @@ -52,17 +52,3 @@
52 52  #set ($columns = ['doc.title', 'QuaWoman', 'QuaMan', 'doc.author', '_actions'])
53 53  #livetable('Duncan1' $columns $columnsProperties $options)
54 54  {{/velocity}}
55 -
56 -{{python}}
57 -print "The full name of this document is " + doc.getFullName()
58 -import sys
59 -print sys.path
60 -{{/python}}
61 -
62 -{{velocity}}
63 -#set($hql = "")
64 -#set($results = $xwiki.searchDocuments($hql, 5, 0))
65 -#foreach ($item in $results)
66 - * $item
67 -#end
68 -{{/velocity}}

Need help?

If you need help with XWiki you can contact: