Changes for page Homeopaths

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

From version 8.145
edited by Jip-jan Alunkel
on December 24, 13:41
Change comment: Renamed from xwiki:practices.WebHome
To version 8.134
edited by Jip-jan Alunkel
on December 22, 14:31
Change comment: Renamed from xwiki:practices.WebHome

Summary

Details

Page properties
Content
... ... @@ -5,20 +5,17 @@
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 11  </p>
12 12  <div id="homeopaths_map"></div>
13 -#if(!$isGuest)
14 +#set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.name like :usr"))
15 +#set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute())
16 +#set($practice_exists = $r.size() > 0)
17 +#if($practice_exists != false)
14 14  
15 - #set($haspractice = $xwiki.getDocument($xcontext.getUserReference()).getObject('XWiki.XWikiUsers').getProperty('practice'))
16 -$haspractice.value
17 - #set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.name like :usr"))
18 - #set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute())
19 - #set($practice_exists = $r.size() > 0)
20 - #if(!$practice_exists)
21 -
22 22  <h2>Add your practice to the map</h2>
23 23  #set($form_start = {
24 24   "id": "homeoworld_form",
... ... @@ -49,6 +49,7 @@
49 49   "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.'
50 50  })
51 51  #createFormElement($practice_name)
49 +
52 52  #set($country = {
53 53   "id" : "country",
54 54   "type" : "text",
... ... @@ -69,6 +69,7 @@
69 69   "help-block" : 'Input and select the country where your practice resides.'
70 70  })
71 71  #createFormElement($country)
70 +
72 72  #set($address = {
73 73   "id" : "address",
74 74   "type" : "address",
... ... @@ -100,7 +100,4 @@
100 100   "use_captcha": "false"
101 101  })
102 102  #createFormEnd($form_end)
103 - #end
104 104  #end
105 -{{/html}}
106 -{{/velocity}}