Wiki broncode van Homeopaths
Version 8.44 by Jip-jan Alunkel on december 08, 15:47
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
2.3 | 1 | {{include reference="assets.pagemaker.macros"/}} |
2 | |||
3 | {{velocity}} | ||
![]() |
8.30 | 4 | #set($discard = $services.localization.use('document', 'homeopaths.Code.translations')) |
![]() |
2.3 | 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})) | ||
8 | |||
![]() |
8.14 | 9 | {{html wiki="false" clean="false"}} |
![]() |
8.24 | 10 | <p> |
![]() |
8.23 | 11 | All about homeopaths. |
![]() |
8.24 | 12 | </p> |
![]() |
8.11 | 13 | <div id="homeopaths_map"></div> |
![]() |
8.44 | 14 | |
15 | #set($query = $services.query.xwql("from doc.object('homeopaths.Code.homeopathsClass') as homeopathObj")) | ||
16 | #set($result = $query.execute()) | ||
17 | #set($map = {}) | ||
18 | #foreach($item in $result) | ||
19 | #set($result_doc = $xwiki.getDocument("${item}")) | ||
20 | #set($spaceReference = $services.model.resolveDocument('', 'default', $result_doc.documentReference.lastSpaceReference).parent) | ||
21 | #set($spaceName = $spaceReference.getName()) | ||
22 | #set($result_obj = $result_doc.getObject("homeopaths.Code.homeopathsClass")) | ||
23 | #set($addressArray = $result_obj.getProperty("address").value).split(",")) | ||
24 | #set($address = "") | ||
25 | #foreach($address_item in $addressArray) | ||
26 | #set($address = "${address}<li>${address_item.trim()}</li>") | ||
27 | #end | ||
28 | #set($info = "<h4>${result_doc.getName()}</h4><ul>${address}</ul>") | ||
29 | #set($discard = $map.put("${result_doc.getName()}", $result_obj.getProperty("latlong").value)) | ||
30 | #end | ||
31 | #if($objecttool.allNull($map)) | ||
32 | #set($mapJSON = {}) | ||
33 | #else | ||
34 | #set($mapJSON = $jsontool.serialize(${map})) | ||
35 | #end | ||
36 | $mapJSON | ||
![]() |
8.25 | 37 | <h2>Add your practice to the map</h2> |
![]() |
2.3 | 38 | #set($form_start = { |
39 | "id": "homeoworld_form", | ||
![]() |
8.3 | 40 | "product": "practice", |
![]() |
2.3 | 41 | "method": "post", |
42 | "url": "", | ||
43 | "use_captcha": "false" | ||
44 | }) | ||
45 | #createFormStart($form_start) | ||
![]() |
8.4 | 46 | #set($practice_name = { |
47 | "id" : "practice_name", | ||
48 | "type" : "text", | ||
49 | "required" : "true", | ||
50 | "label" : "Name of your practice", | ||
51 | "aria-label" : "Enter the name of your practice", | ||
52 | "placeholder" : "$services.localization.render('homeopaths.wordgroup.practice_name.placeholder')", | ||
53 | "data-pattern" : "^[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ]+[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ0-9- ]*$", | ||
54 | "data-error-response-type" : "use_label_definite_1", | ||
55 | "data-auto-first-capital" : "true", | ||
56 | "data-query-type" : "XWQL", | ||
57 | "data-query-reference" : "assets.pagemaker.XWQL.matchTitle", | ||
58 | "data-query-scope" : "homeopaths", | ||
59 | "data-query-list-type" : "suggest-negate", | ||
60 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_negate_list')", | ||
61 | "data-query-list-contents" : "value", | ||
62 | "data-create-page" : "true", | ||
63 | "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.' | ||
64 | }) | ||
65 | #createFormElement($practice_name) | ||
66 | |||
![]() |
8.3 | 67 | #set($country = { |
68 | "id" : "country", | ||
69 | "type" : "text", | ||
70 | "required" : "true", | ||
71 | "label" : "Country of practice residence", | ||
72 | "aria-label" : "Choose the country", | ||
73 | "placeholder" : "$services.localization.render('homeopaths.word.country.placeholder')", | ||
74 | "data-set-space": "true", | ||
![]() |
8.9 | 75 | "data-parent-space": "homeopaths", |
![]() |
8.3 | 76 | "data-error-response-type" : "use_label_definite_1", |
77 | "data-auto-first-capital" : "true", | ||
78 | "data-query-type" : "JSON", | ||
79 | "data-query-reference" : "assets.pagemaker.JSON.countries", | ||
80 | "data-query-list-type" : "suggest-select", | ||
81 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
![]() |
8.5 | 82 | "data-query-list-contents" : "key", |
![]() |
8.3 | 83 | "data-query-list-editable" : "false", |
84 | "help-block" : 'Type and select the country where your practice resides.' | ||
85 | }) | ||
86 | #createFormElement($country) | ||
![]() |
6.2 | 87 | |
![]() |
8.8 | 88 | #* |
89 | "data-create-xobj" : "true", | ||
90 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
91 | "data-xobj-fieldname" : "country", | ||
92 | *# | ||
93 | |||
![]() |
2.3 | 94 | #set($address = { |
95 | "id" : "address", | ||
![]() |
8.2 | 96 | "type" : "address", |
![]() |
2.3 | 97 | "required" : "true", |
98 | "label" : "Address of your practice", | ||
99 | "aria-label" : "Input and select the address of your practice", | ||
100 | "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')", | ||
101 | "data-error-response-type" : "use_label_definite_1", | ||
102 | "data-auto-first-capital" : "true", | ||
![]() |
4.2 | 103 | "data-query-type" : "address", |
104 | "data-query-reference" : "", | ||
![]() |
2.3 | 105 | "data-query-list-type" : "suggest-select", |
106 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
107 | "data-query-list-contents" : "value/key", | ||
108 | "data-query-list-editable" : "false", | ||
109 | "data-create-xobj" : "true", | ||
110 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
111 | "data-xobj-fieldname" : "address", | ||
112 | "help-block" : 'Input and select the address of your practice.' | ||
113 | }) | ||
114 | #createFormElement($address) | ||
115 | #set($submit = { | ||
![]() |
8.7 | 116 | "id" : "create_practice", |
117 | "button-text" : "Add practice", | ||
![]() |
2.3 | 118 | "help-block" : "Please remind yourself to always anonymize the case." |
119 | }) | ||
120 | #createSubmit($submit) | ||
121 | #set($form_end = { | ||
122 | "use_captcha": "false" | ||
123 | }) | ||
124 | #createFormEnd($form_end) | ||
125 |