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

Summary

Details

Page properties
Content
... ... @@ -1,4 +1,40 @@
1 1  {{velocity}}
2 +
3 +{{velocity}}
4 +
5 +#if("$!request.docName" != '')
6 + ## Request for creating a new instance
7 + #set($docName = ${request.docName})
8 + #set($targetDocName = "${request.spaceName}.${docName}")
9 + #if(!$xwiki.exists($targetDocName) && $xwiki.hasAccessLevel('edit', $xcontext.user, $targetDocName))
10 + $response.sendRedirect($xwiki.getURL($targetDocName, 'inline', "template=${escapetool.url($request.template)}&parent=${escapetool.url($request.parent)}"))
11 + ## Stop processing, since we already sent a redirect.
12 + #stop
13 + #end
14 +#end
15 +
16 += Add a new record =
17 +
18 +#if("$!targetDocName" != '' && $xwiki.exists($targetDocName))
19 + {{warning}}The target document already exists. Please choose a different name, or [[view the existing document>>$targetDocName]]{{/warning}}
20 +#elseif("$!targetDocName" != '')
21 + {{warning}}You don't have permission to create that document{{/warning}}
22 +#end
23 +
24 +{{html}}
25 + <form action="" id="newdoc" method="post">
26 + <div>
27 + <input type="hidden" name="parent" value="${doc.fullName}"/>
28 + <input type="hidden" name="template" value="Duncan1.Code.GDataTemplate"/>
29 + <input type="hidden" name="sheet" value="1"/>
30 + <input type="hidden" name="spaceName" value="Duncan1"/>
31 + Document: <input type="text" name="docName" value="Enter profession name here" class="withTip" size="50"/>
32 + <span class="buttonwrapper"><input type="submit" value="Create this record" class="button"/></span>
33 + </div>
34 + </form>
35 +{{/html}}
36 +
37 +
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: