Codice sorgente Wiki di homeopathsSheet

Version 1.10 by Jip-jan Alunkel on marzo 07, 14:56

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 <div id="non_free_occupation">
35 <p class="property">
36 <span class="property-name">Medical degree mandatory</span> <span class="property-value">$doc.display('non_free_occupation')</span>
37 </p>
38 <p class="help-block">
39 Countries over the world have different rules regarding the neccessity of a medical degree to practice homeopathy.
40 </p>
41 </div>
42 #if($hasRight)
43 <p class="buttons text-align-right">
44 <a class="btn btn-secondary" title="Edit" data-toggle="modal" data-target="#detailsModal" role="button" rel="nofollow">
45 <span class="btn-label">Edit details</span>
46 </a>
47 </p>
48 #end
49 </div>
50 #if($hasRight) ## Ook de rechts situatie uitlezen en meenemen.
51 #set($form_start = {
52 "id": "homeopaths_form",
53 "product": "homeopath details",
54 "method": "post",
55 "url": "",
56 "use_captcha": "false"
57 })
58 #set($city = {
59 "id": "city",
60 "type": "text",
61 "required" : "false",
62 "label" : "City",
63 "data-create-xobj" : "true",
64 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
65 "data-xobj-fieldname" : "pmCity",
66 "value": "$theDocObj.getProperty('pmCity').value"
67 })
68 #set($submit = {
69 "id" : "edit_details",
70 "button-text" : "Save changes",
71 "clean": "true",
72 "help-block" : ""
73 })
74 #set($form_end = {
75 "use_captcha": "false"
76 })
77 <div class="modal fade" id="detailsModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
78 <div class="modal-dialog modal-dialog-centered" role="document">
79 <div class="modal-content">
80 #createFormStart($form_start)
81 <div class="modal-header">
82 <h3 class="modal-title">Details</h3>
83 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
84 <span aria-hidden="true">&times;</span>
85 </button>
86 </div>
87 <div class="modal-body">
88 #createFormElement($city)
89 </div>
90 <div class="modal-footer">
91 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
92 #createSubmit($submit)
93 </div>
94 #createFormEnd($form_end)
95 </div>
96 </div>
97 </div>
98 #end
99 #else
100 This page can not be viewed in inline mode.
101 #end
102 {{/html}}
103 {{/velocity}}