Changes for page Homeopaths

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

From version 8.142
edited by Jip-jan Alunkel
on December 22, 14:56
Change comment: Renamed from xwiki:practices.WebHome
To version 8.130
edited by Jip-jan Alunkel
on December 09, 20:17
Change comment: Renamed from xwiki:practices.WebHome

Summary

Details

Page properties
Content
... ... @@ -5,16 +5,23 @@
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 8  {{html wiki="false" clean="false"}}
9 9  <p>
10 10  All about homeopaths.
11 -</p>
12 -<div id="homeopaths_map"></div>
12 +
13 13  #set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.name like :usr"))
14 14  #set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute())
15 -#set($practice_exists = $r.size() > 0)
16 -#if(!$practice_exists && !$isGuest)
17 17  
16 +#if($r.size() > 0)
17 +Practice page exists.
18 +#else
19 +No practice page.
20 +#end
21 +</p>
22 +<div id="homeopaths_map"></div>
23 +
24 +
18 18  <h2>Add your practice to the map</h2>
19 19  #set($form_start = {
20 20   "id": "homeoworld_form",
... ... @@ -45,6 +45,7 @@
45 45   "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.'
46 46  })
47 47  #createFormElement($practice_name)
55 +
48 48  #set($country = {
49 49   "id" : "country",
50 50   "type" : "text",
... ... @@ -65,6 +65,13 @@
65 65   "help-block" : 'Input and select the country where your practice resides.'
66 66  })
67 67  #createFormElement($country)
76 +
77 +#*
78 + "data-create-xobj" : "true",
79 + "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
80 + "data-xobj-fieldname" : "country",
81 +*#
82 +
68 68  #set($address = {
69 69   "id" : "address",
70 70   "type" : "address",
... ... @@ -96,6 +96,4 @@
96 96   "use_captcha": "false"
97 97  })
98 98  #createFormEnd($form_end)
99 -#end
100 -{{/html}}
101 -{{/velocity}}
114 +
XWiki.JavaScriptExtension[0]
Code
... ... @@ -23,7 +23,7 @@
23 23   #end
24 24   #set($address = "${address}${address_item.trim()}${linebreak}")
25 25   #end
26 - #set($info = "<h4><a href='$xwiki.getURL($result_doc.documentReference)'>${stringtool.capitalize($result_doc.getDisplayTitle())}</a></h4><address>${address}</address>")
26 + #set($info = "<h4><a href='$xwiki.getURL($result_doc.documentReference)'>${stringtool.capitalize($result_doc.documentReference.getName())}</a></h4><address>${address}</address>")
27 27   #set($discard = $map.put($info, $result_obj.getProperty("latlong").value))
28 28   #end
29 29   #if($objecttool.allNull($map))