Wiki source code of homeopathsSheet

Version 1.8 by Jip-jan Alunkel on March 07, 13:37

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
15 {{html wiki="true" clean="false"}}
Jip-jan Alunkel 1.7 16 #if(!$isGuest)
Jip-jan Alunkel 1.4 17 <script>
18 var pagemakerOffspring = "disable";
19 </script>
Jip-jan Alunkel 1.7 20 #end
21 #if($hasRight)
Jip-jan Alunkel 1.1 22 <p class="buttons text-align-right">
23 <a class="btn btn-primary" title="Edit" href="$doc.getURL("edit")?editor=wysiwyg" role="button" rel="nofollow">
24 <span class="fa fa-pencil"></span>
25 <span class="btn-label">Edit contents</span>
26 </a>
27 </p>
Jip-jan Alunkel 1.7 28 #end
Jip-jan Alunkel 1.1 29 #set($spaceReference = $services.model.resolveDocument('', 'default', $doc.documentReference.lastSpaceReference).parent)
30 #set($spaceTitle = $spaceReference.getName())
31 <div class="clearfix"></div>
32 #if($xcontext.action == "view")
33 <div id="${spaceTitle}" class="box sheet_properties">
34 <h2>Details</h2>
35 <div id="non_free_occupation">
36 <p class="property">
37 <span class="property-name">Medical degree mandatory</span> <span class="property-value">$doc.display('non_free_occupation')</span>
38 </p>
39 <p class="help-block">
40 Countries over the world have different rules regarding the neccessity of a medical degree to practice homeopathy.
41 </p>
42 </div>
Jip-jan Alunkel 1.7 43 #if($hasRight)
Jip-jan Alunkel 1.1 44 <p class="buttons text-align-right">
45 <a class="btn btn-secondary" title="Edit" data-toggle="modal" data-target="#detailsModal" role="button" rel="nofollow">
46 <span class="btn-label">Edit details</span>
47 </a>
48 </p>
49 #end
50 </div>
Jip-jan Alunkel 1.7 51 #if($hasRight) ## Ook de rechts situatie uitlezen en meenemen.
Jip-jan Alunkel 1.1 52 #set($form_start = {
Jip-jan Alunkel 1.5 53 "id": "homeopaths_form",
54 "product": "homeopath details",
Jip-jan Alunkel 1.1 55 "method": "post",
56 "url": "",
57 "use_captcha": "false"
58 })
Jip-jan Alunkel 1.5 59 #set($city = {
60 "id": "city",
61 "type": "text",
Jip-jan Alunkel 1.1 62 "required" : "false",
Jip-jan Alunkel 1.5 63 "label" : "City",
Jip-jan Alunkel 1.1 64 "data-create-xobj" : "true",
Jip-jan Alunkel 1.5 65 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
66 "data-xobj-fieldname" : "city",
67 "value": "$theDocObj.getProperty('city').value"
Jip-jan Alunkel 1.1 68 })
69 #set($submit = {
70 "id" : "edit_details",
71 "button-text" : "Save changes",
72 "clean": "true",
73 "help-block" : ""
74 })
75 #set($form_end = {
76 "use_captcha": "false"
77 })
78 <div class="modal fade" id="detailsModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
79 <div class="modal-dialog modal-dialog-centered" role="document">
80 <div class="modal-content">
81 #createFormStart($form_start)
82 <div class="modal-header">
83 <h3 class="modal-title">Details</h3>
84 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
85 <span aria-hidden="true">&times;</span>
86 </button>
87 </div>
88 <div class="modal-body">
Jip-jan Alunkel 1.5 89 #createFormElement($city)
Jip-jan Alunkel 1.1 90 </div>
91 <div class="modal-footer">
92 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
93 #createSubmit($submit)
94 </div>
95 #createFormEnd($form_end)
96 </div>
97 </div>
98 </div>
99 #end
Jip-jan Alunkel 1.7 100 #else
101 This page can not be viewed in inline mode.
Jip-jan Alunkel 1.1 102 #end
103 {{/html}}
104 {{/velocity}}