Wiki source code of Books

Version 8.27 by Jip-jan Alunkel on abril 17, 22:51

Show last authors
1 {{include reference="assets.formMaker.macros" /}}
2
3 {{velocity}}
4 #set($discard = $services.localization.use('document', 'cases.Code.translations'))
5 #set($discard = $services.localization.use('document', 'assets.formMaker.translations'))
6 #set($discard = $xwiki.ssx.use('assets.formMaker.WebHome'))
7 #set($discard = $xwiki.jsx.use('assets.formMaker.WebHome', {'minify' : false}))
8
9 {{html wiki="true" clean="false"}}
10 <p>
11 All about books
12 </p>
13 <h2 class="livetable">Overview of all books</h2>
14 <div id="livetable">
15
16 #set ($columns = ["doc.title", "author", "doc.space"])
17 #set ($columnsProperties = {
18 "doc.title": {"type": "text", "filterable" : true, "sortable": true, "link": "view"},
19 "remedy" : {"type": "text", "filterable" : true, "sortable": true, "size" : 4},
20 "doc.space" : {"type": "text", "filterable" : true, "sortable": true, "size" : 4, "link": "space"}
21 })
22 #set ($options = {
23 "className" : "books.WebHome",
24 "translationPrefix" : "books.livetable.",
25 "queryFilters" : "currentlanguage",
26 "rowCount": 10
27 })
28 #livetable("books" $columns $columnsProperties $options)
29
30 </div>
31 <h3>Add a book to this wiki</h3>
32 <p>
33 Do you know of any books that can be of value to people who would like to learn more about homeopathy?
34 Please feel free to share these books with our readers. However, to make sure your case is correctly filed in this wiki it is necessary that you answer a few simple questions about the case.
35 </p>
36
37 #createFormStart("homeoworld_form" "book")
38
39 #set($booktype = {
40 "id" : "booktype",
41 "type" : "select",
42 "required" : "true",
43 "label" : "Type of book",
44 "aria-label" : "Select the type of book",
45 "placeholder" : "Type",
46 "data-error-response-type" : "use_label_definite_1",
47 "data-set-space" : "true",
48 "select-json" : {
49 "boektiep_1" : "Dit is boektiep 1",
50 "boektiep_2" : "Dit is boektiep 2",
51 "boektiep_3" : "Dit is boektiep 3",
52 "boektiep_4" : "Dit is boektiep 4",
53 "boektiep_5" : "Dit is boektiep 5"
54 },
55 "help-block" : "Choose the type of book you would like to add."
56 })
57
58 #createFormElement($booktype)
59
60 #set($book_title = {
61 "id" : "book_title",
62 "type" : "text",
63 "required" : "true",
64 "label" : "Title of the book",
65 "aria-label" : "Enter the title of the book",
66 "placeholder" : "Title",
67 "data-error-response-type" : "use_label_definite_1",
68 "data-query-type" : "XWQL.matchTitle",
69 "data-query-scope" : "materia-medica",
70 "data-query-list-type" : "suggest-negate",
71 "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_negate_list')",
72 "data-query-list-contents" : "value",
73 "data-create-page" : "true",
74 "help-block" : 'When providing a title of a common type of book, please also provide the authorʼs last name, viz. Boericke Materia Medica.'
75 })
76
77 #createFormElement($book_title)
78
79 #set($author = {
80 "id" : "author",
81 "type" : "text",
82 "required" : "true",
83 "label" : "Author of the book",
84 "aria-label" : "Enter the author of the book",
85 "placeholder" : "Author",
86 "data-error-response-type" : "use_label_definite_1",
87 "data-query-type" : "XWQL.matchObject",
88 "data-query-scope" : "books",
89 "data-query-list-type" : "suggest-select",
90 "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_select_list')",
91 "data-query-list-contents" : "value",
92 "data-query-list-editable" : "true",
93 "data-create-xobj" : "true",
94 "data-xobj-classname" : "books.WebHome",
95 "data-xobj-fieldname" : "author",
96 "help-block" : 'Select the author of this case.'
97 })
98
99 #createFormElement($author)
100
101 #set($publish_year = {
102 "id" : "publish_year",
103 "type" : "number",
104 "required" : "true",
105 "label" : "Year of publishing",
106 "aria-label" : "Enter the year of publishing",
107 "placeholder" : "Year",
108 "data-error-response-type" : "use_label_definite_1",
109 "data-create-xobj" : "true",
110 "data-xobj-classname" : "books.WebHome",
111 "data-xobj-fieldname" : "publish_year"
112 })
113
114 #createFormElement($publish_year)
115
116 #set($extra_info = {
117 "id" : "extra_info",
118 "type" : "checkbox",
119 "required" : "no",
120 "label" : "Extra information (optional)",
121 "value" : "yes"
122 })
123
124 #createFormElement($extra_info)
125
126 #createExpandStart("extra_info" "yes")
127
128 #createExpandEnd()
129
130 #set($submit = {
131 "id" : "create_book",
132 "button-text" : "Create book",
133 "help-block" : ""
134 })
135 #createSubmit($submit)
136
137 #createFormEnd()
138
139 {{/html}}
140 {{/velocity}}