Исходный код вики homeopathsSheet

Версия 1.7 от Jip-jan Alunkel на марта 07, 13:36

Последние авторы
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
15 $hasRight
16
17 {{html wiki="true" clean="false"}}
18 #if(!$isGuest)
19 <script>
20 var pagemakerOffspring = "disable";
21 </script>
22 #end
23 #if($hasRight)
24 <p class="buttons text-align-right">
25 <a class="btn btn-primary" title="Edit" href="$doc.getURL("edit")?editor=wysiwyg" role="button" rel="nofollow">
26 <span class="fa fa-pencil"></span>
27 <span class="btn-label">Edit contents</span>
28 </a>
29 </p>
30 #end
31 #set($spaceReference = $services.model.resolveDocument('', 'default', $doc.documentReference.lastSpaceReference).parent)
32 #set($spaceTitle = $spaceReference.getName())
33 <div class="clearfix"></div>
34 #if($xcontext.action == "view")
35 <div id="${spaceTitle}" class="box sheet_properties">
36 <h2>Details</h2>
37 <div id="non_free_occupation">
38 <p class="property">
39 <span class="property-name">Medical degree mandatory</span> <span class="property-value">$doc.display('non_free_occupation')</span>
40 </p>
41 <p class="help-block">
42 Countries over the world have different rules regarding the neccessity of a medical degree to practice homeopathy.
43 </p>
44 </div>
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" : "city",
69 "value": "$theDocObj.getProperty('city').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}}