Changes for page Homeopaths
Last modified by Jip-jan Alunkel on May 06, 23:58
From version 7.1
edited by Jip-jan Alunkel
on November 28, 15:32
on November 28, 15:32
Change comment:
Renamed from xwiki:practices.WebHome
To version 8.31
edited by Jip-jan Alunkel
on December 08, 13:49
on December 08, 13:49
Change comment:
Renamed from xwiki:practices.WebHome
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (0 modified, 2 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,27 +1,113 @@ 1 1 {{include reference="assets.pagemaker.macros"/}} 2 2 3 3 {{velocity}} 4 -#set($discard = $services.localization.use('document', ' cases.Code.translations'))4 +#set($discard = $services.localization.use('document', 'homeopaths.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 -{{html wiki="true" clean="false"}} 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 + {} 22 + #else 23 + console.log($jsontool.serialize(${map})); 24 + #end 25 + 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> 10 10 #set($form_start = { 11 11 "id": "homeoworld_form", 12 - "product": " case",54 + "product": "practice", 13 13 "method": "post", 14 14 "url": "", 15 15 "use_captcha": "false" 16 16 }) 17 17 #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) 18 18 19 -<div class="autocomplete-container" id="autocomplete-container"></div> 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) 20 20 102 +#* 103 + "data-create-xobj" : "true", 104 + "data-xobj-classname" : "homeopaths.Code.homeopathsClass", 105 + "data-xobj-fieldname" : "country", 106 +*# 21 21 22 22 #set($address = { 23 23 "id" : "address", 24 - "type" : " text",110 + "type" : "address", 25 25 "required" : "true", 26 26 "label" : "Address of your practice", 27 27 "aria-label" : "Input and select the address of your practice", ... ... @@ -41,8 +41,8 @@ 41 41 }) 42 42 #createFormElement($address) 43 43 #set($submit = { 44 - "id" : "create_ case",45 - "button-text" : " Submit",130 + "id" : "create_practice", 131 + "button-text" : "Add practice", 46 46 "help-block" : "Please remind yourself to always anonymize the case." 47 47 }) 48 48 #createSubmit($submit)
- XWiki.JavaScriptExtension[0]
-
- Caching policy
-
... ... @@ -1,0 +1,1 @@ 1 +forbid - Code
-
... ... @@ -1,0 +1,36 @@ 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 + {} 18 + #else 19 + console.log($jsontool.serialize(${map}), $map); 20 + #end 21 + 22 + var markers = [ 23 + [ -0.1244324, 51.5006728, "Big Ben" ], 24 + [ -0.119623, 51.503308, "London Eye" ], 25 + [ -0.1279688, 51.5077286, "Nelson's Column<br><a href=\"https://en.wikipedia.org/wiki/Nelson's_Column\">wp</a>" ] 26 + ]; 27 + for (var i=0; i<markers.length; i++) { 28 + let lon = markers[i][0], 29 + lat = markers[i][1], 30 + popupText = markers[i][2], 31 + markerLocation = new L.LatLng(lat, lon), 32 + marker = new L.Marker(markerLocation); 33 + map.addLayer(marker); 34 + marker.bindPopup(popupText); 35 + } 36 + - Parse content
-
... ... @@ -1,0 +1,1 @@ 1 +Yes - Use this extension
-
... ... @@ -1,0 +1,1 @@ 1 +currentPage
- XWiki.StyleSheetExtension[0]
-
- Caching policy
-
... ... @@ -1,0 +1,1 @@ 1 +long