Código fuente wiki de Homeopaths
Versión 8.32 por Jip-jan Alunkel el diciembre 08, 13:51
Ocultar los últimos autores
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.30 | 12 | #set($query = $services.query.xwql("from doc.object('homeopaths.Code.homeopathsClass') as caseObj")) |
13 | #set($result = $query.execute()) | ||
14 | #set($map = {}) | ||
15 | #foreach($item in $result) | ||
16 | #set($result_doc = $xwiki.getDocument("${item}")) | ||
17 | #set($result_obj = $result_doc.getObject("homeopaths.Code.homeopathsClass")) | ||
18 | #set($discard = $map.put("${item}", $result_obj.getProperty("latlong").value)) | ||
19 | #end | ||
20 | #if($objecttool.allNull($map)) | ||
21 | {} | ||
22 | #else | ||
![]() |
8.32 | 23 | $jsontool.serialize(${map}) |
24 | $map | ||
![]() |
8.30 | 25 | #end |
26 | |||
![]() |
8.24 | 27 | </p> |
![]() |
8.11 | 28 | <div id="homeopaths_map"></div> |
29 | |||
![]() |
8.12 | 30 | <script> |
![]() |
8.22 | 31 | var map = L.map('homeopaths_map').setView([18, 10], 2); |
![]() |
8.21 | 32 | L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { |
![]() |
8.13 | 33 | maxZoom: 19, |
![]() |
8.15 | 34 | attribution: '' |
![]() |
8.21 | 35 | }).addTo(map); |
36 | map.attributionControl.setPrefix(''); | ||
37 | var markers = [ | ||
38 | [ -0.1244324, 51.5006728, "Big Ben" ], | ||
39 | [ -0.119623, 51.503308, "London Eye" ], | ||
40 | [ -0.1279688, 51.5077286, "Nelson's Column<br><a href=\"https://en.wikipedia.org/wiki/Nelson's_Column\">wp</a>" ] | ||
41 | ]; | ||
42 | for (var i=0; i<markers.length; i++) { | ||
![]() |
8.22 | 43 | let lon = markers[i][0], |
44 | lat = markers[i][1], | ||
45 | popupText = markers[i][2], | ||
46 | markerLocation = new L.LatLng(lat, lon), | ||
47 | marker = new L.Marker(markerLocation); | ||
![]() |
8.21 | 48 | map.addLayer(marker); |
49 | marker.bindPopup(popupText); | ||
50 | } | ||
![]() |
8.12 | 51 | </script> |
![]() |
8.25 | 52 | <h2>Add your practice to the map</h2> |
![]() |
2.3 | 53 | #set($form_start = { |
54 | "id": "homeoworld_form", | ||
![]() |
8.3 | 55 | "product": "practice", |
![]() |
2.3 | 56 | "method": "post", |
57 | "url": "", | ||
58 | "use_captcha": "false" | ||
59 | }) | ||
60 | #createFormStart($form_start) | ||
![]() |
8.4 | 61 | #set($practice_name = { |
62 | "id" : "practice_name", | ||
63 | "type" : "text", | ||
64 | "required" : "true", | ||
65 | "label" : "Name of your practice", | ||
66 | "aria-label" : "Enter the name of your practice", | ||
67 | "placeholder" : "$services.localization.render('homeopaths.wordgroup.practice_name.placeholder')", | ||
68 | "data-pattern" : "^[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ]+[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ0-9- ]*$", | ||
69 | "data-error-response-type" : "use_label_definite_1", | ||
70 | "data-auto-first-capital" : "true", | ||
71 | "data-query-type" : "XWQL", | ||
72 | "data-query-reference" : "assets.pagemaker.XWQL.matchTitle", | ||
73 | "data-query-scope" : "homeopaths", | ||
74 | "data-query-list-type" : "suggest-negate", | ||
75 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_negate_list')", | ||
76 | "data-query-list-contents" : "value", | ||
77 | "data-create-page" : "true", | ||
78 | "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.' | ||
79 | }) | ||
80 | #createFormElement($practice_name) | ||
81 | |||
![]() |
8.3 | 82 | #set($country = { |
83 | "id" : "country", | ||
84 | "type" : "text", | ||
85 | "required" : "true", | ||
86 | "label" : "Country of practice residence", | ||
87 | "aria-label" : "Choose the country", | ||
88 | "placeholder" : "$services.localization.render('homeopaths.word.country.placeholder')", | ||
89 | "data-set-space": "true", | ||
![]() |
8.9 | 90 | "data-parent-space": "homeopaths", |
![]() |
8.3 | 91 | "data-error-response-type" : "use_label_definite_1", |
92 | "data-auto-first-capital" : "true", | ||
93 | "data-query-type" : "JSON", | ||
94 | "data-query-reference" : "assets.pagemaker.JSON.countries", | ||
95 | "data-query-list-type" : "suggest-select", | ||
96 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
![]() |
8.5 | 97 | "data-query-list-contents" : "key", |
![]() |
8.3 | 98 | "data-query-list-editable" : "false", |
99 | "help-block" : 'Type and select the country where your practice resides.' | ||
100 | }) | ||
101 | #createFormElement($country) | ||
![]() |
6.2 | 102 | |
![]() |
8.8 | 103 | #* |
104 | "data-create-xobj" : "true", | ||
105 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
106 | "data-xobj-fieldname" : "country", | ||
107 | *# | ||
108 | |||
![]() |
2.3 | 109 | #set($address = { |
110 | "id" : "address", | ||
![]() |
8.2 | 111 | "type" : "address", |
![]() |
2.3 | 112 | "required" : "true", |
113 | "label" : "Address of your practice", | ||
114 | "aria-label" : "Input and select the address of your practice", | ||
115 | "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')", | ||
116 | "data-error-response-type" : "use_label_definite_1", | ||
117 | "data-auto-first-capital" : "true", | ||
![]() |
4.2 | 118 | "data-query-type" : "address", |
119 | "data-query-reference" : "", | ||
![]() |
2.3 | 120 | "data-query-list-type" : "suggest-select", |
121 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
122 | "data-query-list-contents" : "value/key", | ||
123 | "data-query-list-editable" : "false", | ||
124 | "data-create-xobj" : "true", | ||
125 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
126 | "data-xobj-fieldname" : "address", | ||
127 | "help-block" : 'Input and select the address of your practice.' | ||
128 | }) | ||
129 | #createFormElement($address) | ||
130 | #set($submit = { | ||
![]() |
8.7 | 131 | "id" : "create_practice", |
132 | "button-text" : "Add practice", | ||
![]() |
2.3 | 133 | "help-block" : "Please remind yourself to always anonymize the case." |
134 | }) | ||
135 | #createSubmit($submit) | ||
136 | #set($form_end = { | ||
137 | "use_captcha": "false" | ||
138 | }) | ||
139 | #createFormEnd($form_end) | ||
140 |