Wiki source code of homeopathsSheet

Version 1.13 by Jip-jan Alunkel on March 07, 17:53

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.11 34 #set($classProperties = ['pmCountry','pmState','pmCounty','pmPostcode','pmCity','pmStreet','pmHousenumber'])
35 #*
36 {
37 'pmCountry': '$services.localization.render("homeopaths.pmCountry")',
38 'pmState': '$services.localization.render("homeopaths.classproperty.pmState")',
39 'pmCounty': '$services.localization.render("homeopaths.classproperty.pmCounty")',
40 'pmPostcode': '$services.localization.render("homeopaths.classproperty.pmPostcode")',
41 'pmCity': '$services.localization.render("homeopaths.classproperty.pmCity")',
42 'pmStreet': '$services.localization.render("homeopaths.classproperty.pmStreet")',
43 'pmHousenumber': '$services.localization.render("homeopaths.classproperty.pmHousenumber")'
44 })
45 *#
46 #foreach($property in $classProperties)
Jip-jan Alunkel 1.13 47 #if($theDocObj.getProperty($property).value != "")
Jip-jan Alunkel 1.1 48 <p class="property">
Jip-jan Alunkel 1.12 49 <span class="property-name">$services.localization.render("homeopaths.classproperty.${property}")</span> <span class="property-value">$doc.display($property)</span>
Jip-jan Alunkel 1.1 50 </p>
Jip-jan Alunkel 1.13 51 #end
Jip-jan Alunkel 1.12 52 #end
Jip-jan Alunkel 1.11 53
Jip-jan Alunkel 1.7 54 #if($hasRight)
Jip-jan Alunkel 1.1 55 <p class="buttons text-align-right">
56 <a class="btn btn-secondary" title="Edit" data-toggle="modal" data-target="#detailsModal" role="button" rel="nofollow">
57 <span class="btn-label">Edit details</span>
58 </a>
59 </p>
60 #end
61 </div>
Jip-jan Alunkel 1.7 62 #if($hasRight) ## Ook de rechts situatie uitlezen en meenemen.
Jip-jan Alunkel 1.1 63 #set($form_start = {
Jip-jan Alunkel 1.5 64 "id": "homeopaths_form",
65 "product": "homeopath details",
Jip-jan Alunkel 1.1 66 "method": "post",
67 "url": "",
68 "use_captcha": "false"
69 })
Jip-jan Alunkel 1.5 70 #set($city = {
71 "id": "city",
72 "type": "text",
Jip-jan Alunkel 1.1 73 "required" : "false",
Jip-jan Alunkel 1.5 74 "label" : "City",
Jip-jan Alunkel 1.1 75 "data-create-xobj" : "true",
Jip-jan Alunkel 1.5 76 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
Jip-jan Alunkel 1.10 77 "data-xobj-fieldname" : "pmCity",
78 "value": "$theDocObj.getProperty('pmCity').value"
79 })
80 #set($submit = {
81 "id" : "edit_details",
82 "button-text" : "Save changes",
83 "clean": "true",
84 "help-block" : ""
85 })
86 #set($form_end = {
87 "use_captcha": "false"
88 })
89 <div class="modal fade" id="detailsModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
90 <div class="modal-dialog modal-dialog-centered" role="document">
91 <div class="modal-content">
92 #createFormStart($form_start)
93 <div class="modal-header">
94 <h3 class="modal-title">Details</h3>
95 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
96 <span aria-hidden="true">&times;</span>
97 </button>
98 </div>
99 <div class="modal-body">
Jip-jan Alunkel 1.5 100 #createFormElement($city)
Jip-jan Alunkel 1.1 101 </div>
102 <div class="modal-footer">
103 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
104 #createSubmit($submit)
105 </div>
106 #createFormEnd($form_end)
107 </div>
108 </div>
109 </div>
110 #end
Jip-jan Alunkel 1.7 111 #else
112 This page can not be viewed in inline mode.
Jip-jan Alunkel 1.1 113 #end
114 {{/html}}
115 {{/velocity}}