Código fuente wiki de Homeopaths

Versión 8.73 por Jip-jan Alunkel el diciembre 08, 16:27

Mostrar los últimos autores
1 {{include reference="assets.pagemaker.macros"/}}
2
3 {{velocity}}
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}))
8
9 {{html wiki="false" clean="false"}}
10 <p>
11 All about homeopaths.
12 #set($query = $services.query.xwql("from doc.object('homeopaths.Code.homeopathsClass') as homeopathObj"))
13 #set($result = $query.execute())
14 #set($map = {})
15 #foreach($item in $result)
16 #set($result_doc = $xwiki.getDocument("${item}"))
17 #set($result_obj = $result_doc.getObject("homeopaths.Code.homeopathsClass"))
18 #set($addressArray = $result_obj.getProperty("address").value.split(","))
19 #set($address = "")
20 #foreach($address_item in $addressArray)
21 #if($foreach.hasNext)
22 #set($linebreak = "<br />")
23 #else
24 #set($linebreak = "")
25 #end
26 #set($address = "${address}${address_item.trim()}${linebreak}")
27 #end
28 #set($info = "<h4>${stringtool.capitalize($result_doc.documentReference.getName())}</h4><address>${address}</address>")
29 #set($discard = $map.put($info, $result_obj.getProperty("latlong").value))
30 #end
31 #if($objecttool.allNull($map))
32 #set($mapJSON = {})
33 #else
34 #set($mapJSON = $jsontool.serialize(${map}))
35 #end
36 $mapJSON
37 </p>
38 <div id="homeopaths_map"></div>
39
40 <h2>Add your practice to the map</h2>
41 #set($form_start = {
42 "id": "homeoworld_form",
43 "product": "practice",
44 "method": "post",
45 "url": "",
46 "use_captcha": "false"
47 })
48 #createFormStart($form_start)
49 #set($practice_name = {
50 "id" : "practice_name",
51 "type" : "text",
52 "required" : "true",
53 "label" : "Name of your practice",
54 "aria-label" : "Enter the name of your practice",
55 "placeholder" : "$services.localization.render('homeopaths.wordgroup.practice_name.placeholder')",
56 "data-pattern" : "^[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ]+[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ0-9- ]*$",
57 "data-error-response-type" : "use_label_definite_1",
58 "data-auto-first-capital" : "true",
59 "data-query-type" : "XWQL",
60 "data-query-reference" : "assets.pagemaker.XWQL.matchTitle",
61 "data-query-scope" : "homeopaths",
62 "data-query-list-type" : "suggest-negate",
63 "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_negate_list')",
64 "data-query-list-contents" : "value",
65 "data-create-page" : "true",
66 "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.'
67 })
68 #createFormElement($practice_name)
69
70 #set($country = {
71 "id" : "country",
72 "type" : "text",
73 "required" : "true",
74 "label" : "Country of practice residence",
75 "aria-label" : "Choose the country",
76 "placeholder" : "$services.localization.render('homeopaths.word.country.placeholder')",
77 "data-set-space": "true",
78 "data-parent-space": "homeopaths",
79 "data-error-response-type" : "use_label_definite_1",
80 "data-auto-first-capital" : "true",
81 "data-query-type" : "JSON",
82 "data-query-reference" : "assets.pagemaker.JSON.countries",
83 "data-query-list-type" : "suggest-select",
84 "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')",
85 "data-query-list-contents" : "key",
86 "data-query-list-editable" : "false",
87 "help-block" : 'Type and select the country where your practice resides.'
88 })
89 #createFormElement($country)
90
91 #*
92 "data-create-xobj" : "true",
93 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
94 "data-xobj-fieldname" : "country",
95 *#
96
97 #set($address = {
98 "id" : "address",
99 "type" : "address",
100 "required" : "true",
101 "label" : "Address of your practice",
102 "aria-label" : "Input and select the address of your practice",
103 "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')",
104 "data-error-response-type" : "use_label_definite_1",
105 "data-auto-first-capital" : "true",
106 "data-query-type" : "address",
107 "data-query-reference" : "",
108 "data-query-list-type" : "suggest-select",
109 "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')",
110 "data-query-list-contents" : "value/key",
111 "data-query-list-editable" : "false",
112 "data-create-xobj" : "true",
113 "data-xobj-classname" : "homeopaths.Code.homeopathsClass",
114 "data-xobj-fieldname" : "address",
115 "help-block" : 'Input and select the address of your practice.'
116 })
117 #createFormElement($address)
118 #set($submit = {
119 "id" : "create_practice",
120 "button-text" : "Add practice",
121 "help-block" : "Please remind yourself to always anonymize the case."
122 })
123 #createSubmit($submit)
124 #set($form_end = {
125 "use_captcha": "false"
126 })
127 #createFormEnd($form_end)