Wiki source code of homeopathsSheet

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

Show last authors
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'}))
8 #set($theDoc = $xwiki.getDocument("${doc.fullName}").getTranslatedDocument())
9 #set($isInline = $xcontext.action == 'edit' && $request.get('editor') == 'inline')
10 ## Create object (important for sheet binding, do not remove)
11 #set($theDocObj = $doc.getObject("homeopaths.Code.homeopathsClass", true))
12 #set($hasRight = !$isGuest && ($theDocObj.getProperty('user').value == $context.getUser() || $hasAdmin))
13 $theDoc.getContent()
14 {{html wiki="true" clean="false"}}
15 #if(!$isGuest)
16 <script>
17 var pagemakerOffspring = "disable";
18 </script>
19 #end
20 #if($hasRight)
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>
27 #end
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>
34 #set($classProperties = ['pmPractice','pmStreet','pmHousenumber','pmPostcode','pmCity','pmCounty','pmState','pmCountry'])
35 #foreach($property in $classProperties)
36 #if($theDocObj.getProperty($property).value != "")
37 ## #if($property == 'pmStreet')
38
39 <p class="property">
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>
41 </p>
42 #end
43 #end
44
45 #if($hasRight)
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>
53 #if($hasRight) ## Ook de rechts situatie uitlezen en meenemen.
54 #set($form_start = {
55 "id": "homeopaths_form",
56 "product": "homeopath details",
57 "method": "post",
58 "url": "",
59 "use_captcha": "false"
60 })
61 #set($city = {
62 "id": "city",
63 "type": "text",
64 "required" : "false",
65 "label" : "City",
66 "data-create-xobj" : "true",
67 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
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">
91 #createFormElement($city)
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
102 #else
103 This page can not be viewed in inline mode.
104 #end
105 {{/html}}
106 {{/velocity}}