Wiki source code of homeopathsCountrySheet

Last modified by Jip-jan Alunkel on March 14, 17:20

Show last authors
1 {{include reference="assets.pagemaker.macros"/}}
2
3 {{velocity}}
4 #set($discard = $services.localization.use('document', 'assets.global.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($countrydoc = $xwiki.getDocument("${doc.fullName}").getTranslatedDocument())
9 #set($isInline = $xcontext.action == 'edit' && $request.get('editor') == 'inline')
10 $countrydoc.getContent()
11
12 {{html wiki="true" clean="false"}}
13 #if(!$isGuest)
14 <script>
15 var pagemakerOffspring = "disable";
16 </script>
17 #end
18 #if(!$isGuest)
19 <p class="buttons text-align-right">
20 <a class="btn btn-primary" title="Edit" href="$doc.getURL("edit")?editor=wysiwyg" role="button" rel="nofollow">
21 <span class="fa fa-pencil"></span>
22 <span class="btn-label">Edit contents</span>
23 </a>
24 </p>
25 #end
26 #set($spaceReference = $services.model.resolveDocument('', 'default', $doc.documentReference.lastSpaceReference).parent)
27 #set($spaceTitle = $spaceReference.getName())
28 <div class="clearfix"></div>
29 <h2 class="inline-data-summary">Overview of all homeopaths in $spaceTitle</h2>
30 <div class="livetable inline-data-summary">
31
32 #set ($columns = ["practiceName", "pmCity"])
33 #set ($columnsProperties = {
34 "practiceName": {"type": "text", "filterable" : true, "sortable": true, "link": "view"},
35 "pmCity" : {"type": "text", "filterable" : true, "sortable": true, "headerClass": "city"}
36 })
37 #set ($options = {
38 "className" : "homeopaths.Code.homeopathsClass",
39 "translationPrefix" : "homeopaths.livetable.",
40 "queryFilters" : "currentlanguage",
41 "rowCount": 10,
42 "extraParams": "&space=${doc.space}"
43 })
44 #livetable("cases" $columns $columnsProperties $options)
45
46 </div>
47 ## Get/Create object (important for sheet binding, do not remove)
48 #set($countryObj = $doc.getObject("homeopaths.Code.homeopathsCountryClass", true))
49 ##set($inline = ($request.get('editor') == 'inline'))
50 #if($xcontext.action == "view")
51 <h2 class="inline-data-summary">Details</h2>
52 <div id="${spaceTitle}" class="sheet_properties inline-data-summary">
53 <div id="non_free_occupation">
54 <p class="property">
55 <span class="property-name">Medical degree mandatory</span> <span class="property-value">$doc.display('non_free_occupation')</span>
56 </p>
57 <p class="help-block">
58 Countries over the world have different rules regarding the neccessity of a medical degree to practice homeopathy.
59 </p>
60 </div>
61 #if(!$isGuest)
62 <p class="buttons text-align-right">
63 <a class="btn btn-secondary" title="Edit" data-toggle="modal" data-target="#detailsModal" role="button" rel="nofollow">
64 <span class="btn-label">Edit details</span>
65 </a>
66 </p>
67 #end
68 </div>
69 #if(!$isGuest)
70 #set($form_start = {
71 "id": "homeopathsCountry_form",
72 "product": "country details",
73 "method": "post",
74 "url": "",
75 "use_captcha": "false"
76 })
77 #set($non_free_occupation = {
78 "id": "non_free_occupation",
79 "type": "checkbox",
80 "required" : "false",
81 "label" : "Medical degree mandatory",
82 "data-create-xobj" : "true",
83 "data-xobj-classname" : "homeopaths.Code.homeopathsCountryClass",
84 "data-xobj-fieldname" : "non_free_occupation",
85 "value": "$doc.getObject('homeopaths.Code.homeopathsCountryClass').getProperty('non_free_occupation').value"
86 })
87 #set($submit = {
88 "id" : "edit_details",
89 "button-text" : "Save changes",
90 "clean": "true",
91 "help-block" : ""
92 })
93 #set($form_end = {
94 "use_captcha": "false"
95 })
96 <div class="modal fade" id="detailsModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
97 <div class="modal-dialog modal-dialog-centered" role="document">
98 <div class="modal-content">
99 #createFormStart($form_start)
100 <div class="modal-header">
101 <h3 class="modal-title">Details</h3>
102 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
103 <span aria-hidden="true">&times;</span>
104 </button>
105 </div>
106 <div class="modal-body">
107 #createFormElement($non_free_occupation)
108 </div>
109 <div class="modal-footer">
110 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
111 #createSubmit($submit)
112 </div>
113 #createFormEnd($form_end)
114 </div>
115 </div>
116 </div>
117 #end
118 #end
119 {{/html}}
120 {{/velocity}}