Modifications pour le document Homeopaths

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

Depuis la version 10.53
modifié par Jip-jan Alunkel
sur mars 14, 19:57
Commentaire de modification : Renamed from xwiki:practices.WebHome
À la version 10.49
modifié par Jip-jan Alunkel
sur mars 14, 19:38
Commentaire de modification : Renamed from xwiki:practices.WebHome

Résumé

Détails

Propriétés de la Page
Contenu
... ... @@ -9,6 +9,10 @@
9 9  {{html wiki="false" clean="false"}}
10 10  <p>
11 11  All about the page "homeopaths". Where is it for?
12 + #set($q = $services.query.xwql("from doc.object(homeopaths.Code.homeopathsClass) as homepath where homepath.doc_owner like :usr"))
13 + #set($usrName = $xwiki.getDocument($xcontext.getUserReference()).getFullName())
14 + #set($r = $aq.bindValue('usr',"${usrName}").execute())
15 +
12 12  </p>
13 13  <div id="homeopaths_map"></div>
14 14  #if(!$isGuest)
... ... @@ -16,7 +16,7 @@
16 16   #if($hasPractice)
17 17   #set($q = $services.query.xwql("from doc.object(homeopaths.Code.homeopathsClass) as homepath where homepath.doc_owner like :usr"))
18 18   #set($usrName = $xwiki.getDocument($xcontext.getUserReference()).getFullName())
19 - #set($r = $q.bindValue('usr',"${usrName}").execute())
23 + #set($r = $aq.bindValue('usr',"${usrName}").execute())
20 20   #set($practiceExists = $r.size() > 0)
21 21   #if(!$practiceExists)
22 22  <h2 id="add_practice">Add your practice to the map</h2>
XWiki.JavaScriptExtension[0]
Code
... ... @@ -13,20 +13,6 @@
13 13   #foreach($item in $result)
14 14   #set($result_doc = $xwiki.getDocument("${item}"))
15 15   #set($result_obj = $result_doc.getObject("homeopaths.Code.homeopathsClass"))
16 -
17 - #set($addressArray = ['pmStreet','pmHousenumber','pmPostcode','pmCity','pmState','pmCounty','pmCountry'])
18 - #set($x = {})
19 - #foreach($datapart in $addressArray)
20 - #if($result_obj.getProperty($datapart))
21 - #set($datapart4Publish = $result_obj.getProperty($datapart).value)
22 - #if($datapart == 'pmCountry')
23 - #set($datapart4Publish = $datapart4Publish.toUpperCase())
24 - #end
25 - #set($discard = $x.put("$datapart", $datapart4Publish))
26 - #end
27 - #end
28 - #set($address = "$doc.getTitle()<br />$x['pmStreet'] $x['pmHousenumber']<br />$x['pmPostcode'] $x['pmCity']<br />$x['pmCounty'] $x['pmState']<br />$x['pmCountry']")
29 -#*
30 30   #set($addressArray = $result_obj.getProperty("address").value.split(","))
31 31   #set($address = "")
32 32   #foreach($address_item in $addressArray)
... ... @@ -37,7 +37,6 @@
37 37   #end
38 38   #set($address = "${address}${address_item.trim()}${linebreak}")
39 39   #end
40 -*#
41 41   #set($info = "<h4><a href='$xwiki.getURL($result_doc.documentReference)'>${stringtool.capitalize($result_doc.getDisplayTitle())}</a></h4><address>${address}</address>")
42 42   #set($discard = $map.put($info, $result_obj.getProperty("latlong").value))
43 43   #end