From version < 2.1 >
edited by Alexandru Colesnicov
on 2018/10/23 18:54
To version < 7.1 >
edited by Alexandru Colesnicov
on 2018/10/31 16:23
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,4 +1,47 @@
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 +{{/velocity}}
15 +
16 +{{python}}
17 +import sys
18 +print sys.path
19 +{{/python}}
20 +
21 +{{velocity}}
22 +
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 +
2 2  #set ($columnsProperties = {
3 3   'doc.title': {"link":"view"},
4 4   'QuaWoman': {"filterable":true,"sortable":true},

Need help?

If you need help with XWiki you can contact: