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