Changes for page Duncan1
Last modified by Alexandru Colesnicov on 2018/11/06 17:06
edited by Alexandru Colesnicov
on 2018/10/23 19:06
on 2018/10/23 19:06
edited by Alexandru Colesnicov
on 2018/10/23 18:31
on 2018/10/23 18:31
Change comment: There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,53 +1,0 @@ 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 - 36 -#set ($columnsProperties = { 37 - 'doc.title': {"link":"view"}, 38 - 'QuaWoman': {"filterable":true,"sortable":true}, 39 - 'QuaMan': {"filterable":true,"sortable":true}, 40 - 'doc.author': {"link":"author"}, 41 - '_actions': {"sortable":false,"filterable":false,"html":true,"actions":["edit","delete"]} 42 -}) 43 -#set ($options = { 44 - 'className': 'Duncan1.Code.GDataClass', 45 - 'translationPrefix': 'Duncan1.livetable.', 46 - 'rowCount': 15, 47 - 'maxPages': 10, 48 - 'selectedColumn': 'doc.title', 49 - 'defaultOrder': 'asc' 50 -}) 51 -#set ($columns = ['doc.title', 'QuaWoman', 'QuaMan', 'doc.author', '_actions']) 52 -#livetable('Duncan1' $columns $columnsProperties $options) 53 -{{/velocity}}