Changes for page Homeopaths

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

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

Summary

Details

Page properties
Content
... ... @@ -2,27 +2,34 @@
2 2  
3 3  {{velocity}}
4 4  #set($discard = $services.localization.use('document', 'homeopaths.Code.translations'))
5 +#set($discard = $services.localization.use('document', 'assets.pagemaker.translations'))
6 +#set($discard = $xwiki.ssx.use('assets.pagemaker.WebHome', {'minify': false}))
7 +#set($discard = $xwiki.jsx.use('assets.pagemaker.WebHome', {'minify': false}))
5 5  
9 +#set($bladibla = "blbballbla.blbadafblabla//sel")
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 +
6 6  {{html wiki="false" clean="false"}}
7 7  <p>
8 8  All about homeopaths.
9 9  </p>
10 10  <div id="homeopaths_map"></div>
11 -#set($q = $services.query.xwql("where doc.space like 'homeopaths.%' and doc.name like :usr"))
12 -#set($r = $q.bindValue('usr', $xcontext.getUserReference().getName()).execute())
13 -#set($practice_exists = $r.size() > 0)
14 -#if($practice_exists != false)
15 -{{/html}}
16 -{{/velocity}}
17 -
18 -{{include reference="assets.pagemaker.macros"/}}
19 -
20 -{{velocity}}
21 -#set($discard = $services.localization.use('document', 'assets.pagemaker.translations'))
22 -#set($discard = $xwiki.ssx.use('assets.pagemaker.WebHome', {'minify': false}))
23 -#set($discard = $xwiki.jsx.use('assets.pagemaker.WebHome', {'minify': false}))
24 -
25 -{{html wiki="false" clean="false"}}
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)
26 26  <h2>Add your practice to the map</h2>
27 27  #set($form_start = {
28 28   "id": "homeoworld_form",
... ... @@ -53,7 +53,6 @@
53 53   "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.'
54 54  })
55 55  #createFormElement($practice_name)
56 -
57 57  #set($country = {
58 58   "id" : "country",
59 59   "type" : "text",
... ... @@ -62,6 +62,7 @@
62 62   "aria-label" : "Choose the country",
63 63   "placeholder" : "$services.localization.render('homeopaths.word.country.placeholder')",
64 64   "data-set-space": "true",
71 + "data-space-xobj-classname": "",
65 65   "data-parent-space": "homeopaths",
66 66   "data-error-response-type" : "use_label_definite_1",
67 67   "data-auto-first-capital" : "true",
... ... @@ -74,12 +74,11 @@
74 74   "help-block" : 'Input and select the country where your practice resides.'
75 75  })
76 76  #createFormElement($country)
77 -
78 78  #set($address = {
79 79   "id" : "address",
80 80   "type" : "address",
81 81   "required" : "true",
82 - "label" : "Address of your practice",
88 + "label" : "Address",
83 83   "aria-label" : "Input and select the address of your practice",
84 84   "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')",
85 85   "data-error-response-type" : "use_label_definite_1",
... ... @@ -106,4 +106,8 @@
106 106   "use_captcha": "false"
107 107  })
108 108  #createFormEnd($form_end)
115 + #end
116 + #end
109 109  #end
118 +{{/html}}
119 +{{/velocity}}