Changes for page Homeopaths

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

From version 8.34
edited by Jip-jan Alunkel
on December 08, 13:58
Change comment: Renamed from xwiki:practices.WebHome
To version 8.22
edited by Jip-jan Alunkel
on December 08, 01:29
Change comment: Renamed from xwiki:practices.WebHome

Summary

Details

Page properties
Content
... ... @@ -1,29 +1,12 @@
1 1  {{include reference="assets.pagemaker.macros"/}}
2 2  
3 3  {{velocity}}
4 -#set($discard = $services.localization.use('document', 'homeopaths.Code.translations'))
4 +#set($discard = $services.localization.use('document', 'cases.Code.translations'))
5 5  #set($discard = $services.localization.use('document', 'assets.pagemaker.translations'))
6 6  #set($discard = $xwiki.ssx.use('assets.pagemaker.WebHome', {'minify': false}))
7 7  #set($discard = $xwiki.jsx.use('assets.pagemaker.WebHome', {'minify': false}))
8 8  
9 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 27  <div id="homeopaths_map"></div>
28 28  
29 29  <script>
... ... @@ -48,7 +48,7 @@
48 48   marker.bindPopup(popupText);
49 49   }
50 50  </script>
51 -<h2>Add your practice to the map</h2>
34 +
52 52  #set($form_start = {
53 53   "id": "homeoworld_form",
54 54   "product": "practice",
XWiki.JavaScriptExtension[0]
Caching policy
... ... @@ -1,1 +1,0 @@
1 -forbid
Code
... ... @@ -1,37 +1,0 @@
1 - var map = L.map('homeopaths_map').setView([18, 10], 2);
2 - L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
3 - maxZoom: 19,
4 - attribution: ''
5 - }).addTo(map);
6 - map.attributionControl.setPrefix('');
7 -
8 - #set($query = $services.query.xwql("from doc.object('homeopaths.Code.homeopathsClass') as caseObj"))
9 - #set($result = $query.execute())
10 - #set($map = {})
11 - #foreach($item in $result)
12 - #set($result_doc = $xwiki.getDocument("${item}"))
13 - #set($result_obj = $result_doc.getObject("homeopaths.Code.homeopathsClass"))
14 - #set($discard = $map.put("${item}", $result_obj.getProperty("latlong").value))
15 - #end
16 - #if($objecttool.allNull($map))
17 - #set($output = {})
18 - #else
19 - #set($output = $jsontool.serialize(${map}))
20 - #end
21 -console.log($jsontool.parse($output));
22 -
23 - var markers = [
24 - [ -0.1244324, 51.5006728, "Big Ben" ],
25 - [ -0.119623, 51.503308, "London Eye" ],
26 - [ -0.1279688, 51.5077286, "Nelson's Column<br><a href=\"https://en.wikipedia.org/wiki/Nelson's_Column\">wp</a>" ]
27 - ];
28 - for (var i=0; i<markers.length; i++) {
29 - let lon = markers[i][0],
30 - lat = markers[i][1],
31 - popupText = markers[i][2],
32 - markerLocation = new L.LatLng(lat, lon),
33 - marker = new L.Marker(markerLocation);
34 - map.addLayer(marker);
35 - marker.bindPopup(popupText);
36 - }
37 -
Parse content
... ... @@ -1,1 +1,0 @@
1 -Yes
Use this extension
... ... @@ -1,1 +1,0 @@
1 -currentPage
XWiki.StyleSheetExtension[0]
Caching policy
... ... @@ -1,1 +1,0 @@
1 -long