Changes for page Homeopaths

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

From version 8.143
edited by Jip-jan Alunkel
on December 24, 13:33
Change comment: Renamed from xwiki:practices.WebHome
To version 8.148
edited by Jip-jan Alunkel
on December 24, 13:45
Change comment: Renamed from xwiki:practices.WebHome

Summary

Details

Page properties
Content
... ... @@ -11,14 +11,12 @@
11 11  </p>
12 12  <div id="homeopaths_map"></div>
13 13  #if(!$isGuest)
14 -
15 -$xcontext.getUserReference()
16 -
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 -
14 + #set($hasPractice = $xwiki.getDocument($xcontext.getUserReference()).getObject('XWiki.XWikiUsers').getProperty('practice').value)
15 + #if($hasPractice)
16 + #set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.name like :usr"))
17 + #set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute())
18 + #set($practiceExists = $r.size() > 0)
19 + #if(!$practiceExists)
22 22  <h2>Add your practice to the map</h2>
23 23  #set($form_start = {
24 24   "id": "homeoworld_form",
... ... @@ -100,6 +100,7 @@
100 100   "use_captcha": "false"
101 101  })
102 102  #createFormEnd($form_end)
101 + #end
103 103   #end
104 104  #end
105 105  {{/html}}