Changes for page Homeopaths

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

From version 8.137
edited by Jip-jan Alunkel
on December 22, 14:37
Change comment: Renamed from xwiki:practices.WebHome
To version 8.151
edited by Jip-jan Alunkel
on January 25, 17:49
Change comment: Renamed from xwiki:practices.WebHome

Summary

Details

Page properties
Content
... ... @@ -1,23 +4,35 @@
1 -
2 -{{velocity}}
3 -
4 4  {{include reference="assets.pagemaker.macros"/}}
5 5  
3 +{{velocity}}
6 6  #set($discard = $services.localization.use('document', 'homeopaths.Code.translations'))
7 7  #set($discard = $services.localization.use('document', 'assets.pagemaker.translations'))
8 8  #set($discard = $xwiki.ssx.use('assets.pagemaker.WebHome', {'minify': false}))
9 9  #set($discard = $xwiki.jsx.use('assets.pagemaker.WebHome', {'minify': false}))
10 10  
9 +#set($bladibla = "blbballbla.blbadafblabas//self")
10 +#set($index = $bladibla.indexOf("//self"))
11 +#if($index == -1)
12 + not self
13 + #set($value = $bladibla)
14 +#else
15 + self
16 + #set($value = $bladibla.substring(0, $index))
17 +#end
18 +
19 +$value
20 +
11 11  {{html wiki="false" clean="false"}}
12 12  <p>
13 13  All about homeopaths.
14 14  </p>
15 15  <div id="homeopaths_map"></div>
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($practice_exists = $r.size() > 0)
19 -#if($practice_exists != false)
20 -
26 +#if(!$isGuest)
27 + #set($hasPractice = $xwiki.getDocument($xcontext.getUserReference()).getObject('XWiki.XWikiUsers').getProperty('practice').value)
28 + #if($hasPractice)
29 + #set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.name like :usr"))
30 + #set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute())
31 + #set($practiceExists = $r.size() > 0)
32 + #if(!$practiceExists)
21 21  <h2>Add your practice to the map</h2>
22 22  #set($form_start = {
23 23   "id": "homeoworld_form",
... ... @@ -48,7 +48,6 @@
48 48   "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.'
49 49  })
50 50  #createFormElement($practice_name)
51 -
52 52  #set($country = {
53 53   "id" : "country",
54 54   "type" : "text",
... ... @@ -57,6 +57,7 @@
57 57   "aria-label" : "Choose the country",
58 58   "placeholder" : "$services.localization.render('homeopaths.word.country.placeholder')",
59 59   "data-set-space": "true",
71 + "data-space-xobj-classname": "",
60 60   "data-parent-space": "homeopaths",
61 61   "data-error-response-type" : "use_label_definite_1",
62 62   "data-auto-first-capital" : "true",
... ... @@ -69,12 +69,11 @@
69 69   "help-block" : 'Input and select the country where your practice resides.'
70 70  })
71 71  #createFormElement($country)
72 -
73 73  #set($address = {
74 74   "id" : "address",
75 75   "type" : "address",
76 76   "required" : "true",
77 - "label" : "Address of your practice",
88 + "label" : "Address",
78 78   "aria-label" : "Input and select the address of your practice",
79 79   "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')",
80 80   "data-error-response-type" : "use_label_definite_1",
... ... @@ -101,6 +101,8 @@
101 101   "use_captcha": "false"
102 102  })
103 103  #createFormEnd($form_end)
115 + #end
116 + #end
104 104  #end
105 105  {{/html}}
106 106  {{/velocity}}