Changes for page Duncan1
Last modified by Alexandru Colesnicov on 2018/11/06 17:06
edited by Alexandru Colesnicov
on 2018/10/23 18:54
on 2018/10/23 18:54
edited by Alexandru Colesnicov
on 2018/10/23 19:06
on 2018/10/23 19:06
Change comment: There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,4 +1,38 @@ 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)}&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 + 2 2 #set ($columnsProperties = { 3 3 'doc.title': {"link":"view"}, 4 4 'QuaWoman': {"filterable":true,"sortable":true},