Wiki source code of homeopathsSheet

Version 1.15 by Jip-jan Alunkel on March 07, 18:10

Hide last authors
Jip-jan Alunkel 1.1 1 {{include reference="assets.pagemaker.macros"/}}
2
3 {{velocity}}
4 #set($discard = $services.localization.use('document', 'homeopaths.Code.translations'))
5 #set($discard = $services.localization.use('document', 'assets.pagemaker.translations'))
6 #set($discard = $xwiki.ssx.use('assets.pagemaker.WebHome', {'minify': false}))
7 #set($discard = $xwiki.jsx.use('assets.pagemaker.WebHome', {'minify': false, 'language': $context.language, 'myParameter': 'value'}))
Jip-jan Alunkel 1.5 8 #set($theDoc = $xwiki.getDocument("${doc.fullName}").getTranslatedDocument())
Jip-jan Alunkel 1.1 9 #set($isInline = $xcontext.action == 'edit' && $request.get('editor') == 'inline')
Jip-jan Alunkel 1.5 10 ## Create object (important for sheet binding, do not remove)
11 #set($theDocObj = $doc.getObject("homeopaths.Code.homeopathsClass", true))
Jip-jan Alunkel 1.7 12 #set($hasRight = !$isGuest && ($theDocObj.getProperty('user').value == $context.getUser() || $hasAdmin))
Jip-jan Alunkel 1.5 13 $theDoc.getContent()
Jip-jan Alunkel 1.4 14 {{html wiki="true" clean="false"}}
Jip-jan Alunkel 1.7 15 #if(!$isGuest)
Jip-jan Alunkel 1.4 16 <script>
17 var pagemakerOffspring = "disable";
18 </script>
Jip-jan Alunkel 1.7 19 #end
20 #if($hasRight)
Jip-jan Alunkel 1.1 21 <p class="buttons text-align-right">
22 <a class="btn btn-primary" title="Edit" href="$doc.getURL("edit")?editor=wysiwyg" role="button" rel="nofollow">
23 <span class="fa fa-pencil"></span>
24 <span class="btn-label">Edit contents</span>
25 </a>
26 </p>
Jip-jan Alunkel 1.7 27 #end
Jip-jan Alunkel 1.1 28 #set($spaceReference = $services.model.resolveDocument('', 'default', $doc.documentReference.lastSpaceReference).parent)
29 #set($spaceTitle = $spaceReference.getName())
30 <div class="clearfix"></div>
31 #if($xcontext.action == "view")
32 <div id="${spaceTitle}" class="box sheet_properties">
33 <h2>Details</h2>
Jip-jan Alunkel 1.15 34 #set($classProperties = ['pmPractice','pmStreet','pmHousenumber','pmPostcode','pmCity','pmCounty','pmState','pmCountry'])
Jip-jan Alunkel 1.11 35 #foreach($property in $classProperties)
Jip-jan Alunkel 1.13 36 #if($theDocObj.getProperty($property).value != "")
Jip-jan Alunkel 1.15 37 ## #if($property == 'pmStreet')
38
Jip-jan Alunkel 1.1 39 <p class="property">
Jip-jan Alunkel 1.15 40 <span class="property-name">$services.localization.render("homeopaths.classproperty.#if($property == 'pmStreet')address#{else}${property}")</span> <span class="property-value">$doc.display($property)</span>
Jip-jan Alunkel 1.1 41 </p>
Jip-jan Alunkel 1.13 42 #end
Jip-jan Alunkel 1.12 43 #end
Jip-jan Alunkel 1.11 44
Jip-jan Alunkel 1.7 45 #if($hasRight)
Jip-jan Alunkel 1.1 46 <p class="buttons text-align-right">
47 <a class="btn btn-secondary" title="Edit" data-toggle="modal" data-target="#detailsModal" role="button" rel="nofollow">
48 <span class="btn-label">Edit details</span>
49 </a>
50 </p>
51 #end
52 </div>
Jip-jan Alunkel 1.7 53 #if($hasRight) ## Ook de rechts situatie uitlezen en meenemen.
Jip-jan Alunkel 1.1 54 #set($form_start = {
Jip-jan Alunkel 1.5 55 "id": "homeopaths_form",
56 "product": "homeopath details",
Jip-jan Alunkel 1.1 57 "method": "post",
58 "url": "",
59 "use_captcha": "false"
60 })
Jip-jan Alunkel 1.5 61 #set($city = {
62 "id": "city",
63 "type": "text",
Jip-jan Alunkel 1.1 64 "required" : "false",
Jip-jan Alunkel 1.5 65 "label" : "City",
Jip-jan Alunkel 1.1 66 "data-create-xobj" : "true",
Jip-jan Alunkel 1.5 67 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
Jip-jan Alunkel 1.10 68 "data-xobj-fieldname" : "pmCity",
69 "value": "$theDocObj.getProperty('pmCity').value"
70 })
71 #set($submit = {
72 "id" : "edit_details",
73 "button-text" : "Save changes",
74 "clean": "true",
75 "help-block" : ""
76 })
77 #set($form_end = {
78 "use_captcha": "false"
79 })
80 <div class="modal fade" id="detailsModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
81 <div class="modal-dialog modal-dialog-centered" role="document">
82 <div class="modal-content">
83 #createFormStart($form_start)
84 <div class="modal-header">
85 <h3 class="modal-title">Details</h3>
86 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
87 <span aria-hidden="true">&times;</span>
88 </button>
89 </div>
90 <div class="modal-body">
Jip-jan Alunkel 1.5 91 #createFormElement($city)
Jip-jan Alunkel 1.1 92 </div>
93 <div class="modal-footer">
94 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
95 #createSubmit($submit)
96 </div>
97 #createFormEnd($form_end)
98 </div>
99 </div>
100 </div>
101 #end
Jip-jan Alunkel 1.7 102 #else
103 This page can not be viewed in inline mode.
Jip-jan Alunkel 1.1 104 #end
105 {{/html}}
106 {{/velocity}}