Modifications pour le document Homeopaths

Modifié par Jip-jan Alunkel le mars 14, 20:13

Depuis la version 8.139
modifié par Jip-jan Alunkel
sur décembre 22, 14:54
Commentaire de modification : Renamed from xwiki:practices.WebHome
À la version 8.145
modifié par Jip-jan Alunkel
sur décembre 24, 13:41
Commentaire de modification : Renamed from xwiki:practices.WebHome

Résumé

Détails

Propriétés de la Page
Contenu
... ... @@ -5,17 +5,20 @@
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 -
9 9  {{html wiki="false" clean="false"}}
10 10  <p>
11 11  All about homeopaths.
12 12  </p>
13 13  <div id="homeopaths_map"></div>
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 != true && !$isGuest)
13 +#if(!$isGuest)
18 18  
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 +
19 19  <h2>Add your practice to the map</h2>
20 20  #set($form_start = {
21 21   "id": "homeoworld_form",
... ... @@ -46,7 +46,6 @@
46 46   "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.'
47 47  })
48 48  #createFormElement($practice_name)
49 -
50 50  #set($country = {
51 51   "id" : "country",
52 52   "type" : "text",
... ... @@ -67,7 +67,6 @@
67 67   "help-block" : 'Input and select the country where your practice resides.'
68 68  })
69 69  #createFormElement($country)
70 -
71 71  #set($address = {
72 72   "id" : "address",
73 73   "type" : "address",
... ... @@ -99,6 +99,7 @@
99 99   "use_captcha": "false"
100 100  })
101 101  #createFormEnd($form_end)
103 + #end
102 102  #end
103 103  {{/html}}
104 104  {{/velocity}}