Wiki-Quellcode von Homeopaths
Version 8.155 von Jip-jan Alunkel am Januar 25, 17:53
Verstecke letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
![]() |
8.138 | 1 | {{include reference="assets.pagemaker.macros"/}} |
![]() |
8.137 | 2 | |
3 | {{velocity}} | ||
![]() |
8.30 | 4 | #set($discard = $services.localization.use('document', 'homeopaths.Code.translations')) |
![]() |
8.134 | 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.150 | 8 | |
![]() |
8.154 | 9 | #set($bladibla = "blbballbla.blbadafblabla//self") |
![]() |
8.150 | 10 | #set($index = $bladibla.indexOf("//self")) |
![]() |
8.155 | 11 | #if($index > -1) |
12 | self | ||
13 | #set($value = $bladibla.substring(0, $index)) | ||
14 | #else | ||
![]() |
8.150 | 15 | not self |
16 | #set($value = $bladibla) | ||
17 | #end | ||
18 | |||
19 | $value | ||
20 | |||
![]() |
8.14 | 21 | {{html wiki="false" clean="false"}} |
![]() |
8.24 | 22 | <p> |
![]() |
8.23 | 23 | All about homeopaths. |
![]() |
8.132 | 24 | </p> |
25 | <div id="homeopaths_map"></div> | ||
![]() |
8.143 | 26 | #if(!$isGuest) |
![]() |
8.146 | 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) | ||
![]() |
8.25 | 33 | <h2>Add your practice to the map</h2> |
![]() |
2.3 | 34 | #set($form_start = { |
35 | "id": "homeoworld_form", | ||
![]() |
8.3 | 36 | "product": "practice", |
![]() |
2.3 | 37 | "method": "post", |
38 | "url": "", | ||
39 | "use_captcha": "false" | ||
40 | }) | ||
41 | #createFormStart($form_start) | ||
![]() |
8.4 | 42 | #set($practice_name = { |
43 | "id" : "practice_name", | ||
44 | "type" : "text", | ||
45 | "required" : "true", | ||
46 | "label" : "Name of your practice", | ||
47 | "aria-label" : "Enter the name of your practice", | ||
48 | "placeholder" : "$services.localization.render('homeopaths.wordgroup.practice_name.placeholder')", | ||
49 | "data-pattern" : "^[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ]+[a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ0-9- ]*$", | ||
50 | "data-error-response-type" : "use_label_definite_1", | ||
51 | "data-auto-first-capital" : "true", | ||
52 | "data-query-type" : "XWQL", | ||
![]() |
8.123 | 53 | "data-page-name": "$xcontext.getUserReference().getName()", |
![]() |
8.4 | 54 | "data-query-reference" : "assets.pagemaker.XWQL.matchTitle", |
55 | "data-query-scope" : "homeopaths", | ||
56 | "data-query-list-type" : "suggest-negate", | ||
57 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_negate_list')", | ||
58 | "data-query-list-contents" : "value", | ||
59 | "data-create-page" : "true", | ||
60 | "help-block" : 'This will be used as the title of your practice page. The first character must be a letter.' | ||
61 | }) | ||
62 | #createFormElement($practice_name) | ||
![]() |
8.3 | 63 | #set($country = { |
64 | "id" : "country", | ||
65 | "type" : "text", | ||
66 | "required" : "true", | ||
67 | "label" : "Country of practice residence", | ||
68 | "aria-label" : "Choose the country", | ||
69 | "placeholder" : "$services.localization.render('homeopaths.word.country.placeholder')", | ||
70 | "data-set-space": "true", | ||
![]() |
8.151 | 71 | "data-space-xobj-classname": "", |
![]() |
8.9 | 72 | "data-parent-space": "homeopaths", |
![]() |
8.3 | 73 | "data-error-response-type" : "use_label_definite_1", |
74 | "data-auto-first-capital" : "true", | ||
75 | "data-query-type" : "JSON", | ||
76 | "data-query-reference" : "assets.pagemaker.JSON.countries", | ||
77 | "data-query-list-type" : "suggest-select", | ||
78 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
![]() |
8.5 | 79 | "data-query-list-contents" : "key", |
![]() |
8.3 | 80 | "data-query-list-editable" : "false", |
![]() |
8.98 | 81 | "help-block" : 'Input and select the country where your practice resides.' |
![]() |
8.3 | 82 | }) |
83 | #createFormElement($country) | ||
![]() |
2.3 | 84 | #set($address = { |
85 | "id" : "address", | ||
![]() |
8.2 | 86 | "type" : "address", |
![]() |
2.3 | 87 | "required" : "true", |
![]() |
8.149 | 88 | "label" : "Address", |
![]() |
2.3 | 89 | "aria-label" : "Input and select the address of your practice", |
90 | "placeholder" : "$services.localization.render('homeopaths.multiword.address.placeholder')", | ||
91 | "data-error-response-type" : "use_label_definite_1", | ||
92 | "data-auto-first-capital" : "true", | ||
![]() |
4.2 | 93 | "data-query-type" : "address", |
94 | "data-query-reference" : "", | ||
![]() |
2.3 | 95 | "data-query-list-type" : "suggest-select", |
96 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
97 | "data-query-list-contents" : "value/key", | ||
98 | "data-query-list-editable" : "false", | ||
99 | "data-create-xobj" : "true", | ||
100 | "data-xobj-classname" : "homeopaths.Code.homeopathsClass", | ||
101 | "data-xobj-fieldname" : "address", | ||
![]() |
8.97 | 102 | "help-block" : 'Input street and number, then select the address of your practice.' |
![]() |
2.3 | 103 | }) |
104 | #createFormElement($address) | ||
105 | #set($submit = { | ||
![]() |
8.7 | 106 | "id" : "create_practice", |
107 | "button-text" : "Add practice", | ||
![]() |
2.3 | 108 | "help-block" : "Please remind yourself to always anonymize the case." |
109 | }) | ||
110 | #createSubmit($submit) | ||
111 | #set($form_end = { | ||
112 | "use_captcha": "false" | ||
113 | }) | ||
114 | #createFormEnd($form_end) | ||
![]() |
8.147 | 115 | #end |
![]() |
8.143 | 116 | #end |
![]() |
8.132 | 117 | #end |
![]() |
8.136 | 118 | {{/html}} |
119 | {{/velocity}} |