Wiki source code of Books

Version 8.23 by Jip-jan Alunkel on April 11, 23:53

Hide last authors
Jip-jan Alunkel 8.23 1 {{include reference="assets.formMaker.macros" /}}
2
Jip-jan Alunkel 3.11 3 {{velocity}}
Jip-jan Alunkel 8.23 4 {{html}}
Jip-jan Alunkel 5.2 5 #set($discard = $services.localization.use('document', 'cases.Code.translations'))
6 #set($discard = $services.localization.use('document', 'assets.formMaker.translations'))
7 #set($discard = $xwiki.ssx.use('assets.formMaker.WebHome'))
8 #set($discard = $xwiki.jsx.use('assets.formMaker.WebHome', {'minify' : false}))
Jip-jan Alunkel 8.22 9 <p>
10 All about books
11 </p>
12 <h2 class="livetable">Overview of all books</h2>
13 <div id="livetable">
Jip-jan Alunkel 3.13 14
Jip-jan Alunkel 8.22 15 #set ($columns = ["doc.title", "author", "doc.space"])
16 #set ($columnsProperties = {
17 "doc.title": {"type": "text", "filterable" : true, "sortable": true, "link": "view"},
18 "remedy" : {"type": "text", "filterable" : true, "sortable": true, "size" : 4},
19 "doc.space" : {"type": "text", "filterable" : true, "sortable": true, "size" : 4, "link": "space"}
20 })
21 #set ($options = {
22 "className" : "books.WebHome",
23 "translationPrefix" : "books.livetable.",
24 "queryFilters" : "currentlanguage",
25 "rowCount": 10
26 })
27 #livetable("books" $columns $columnsProperties $options)
28
29 </div>
30 <h3>Add a book to this wiki</h3>
31 <p>
32 Do you know of any books that can be of value to people who would like to learn more about homeopathy?
33 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.
34 </p>
35
Jip-jan Alunkel 6.3 36 #createFormStart("homeoworld_form" "book")
Jip-jan Alunkel 3.12 37
Jip-jan Alunkel 6.2 38 #set($booktype = {
39 "id" : "booktype",
Jip-jan Alunkel 2.2 40 "type" : "select",
Jip-jan Alunkel 7.2 41 "required" : "true",
Jip-jan Alunkel 6.2 42 "label" : "Type of book",
Jip-jan Alunkel 8.8 43 "aria-label" : "Select the type of book",
Jip-jan Alunkel 8.18 44 "placeholder" : "Type",
Jip-jan Alunkel 8.3 45 "data-error-response-type" : "use_label_definite_1",
Jip-jan Alunkel 2.2 46 "data-set-space" : "true",
Jip-jan Alunkel 6.1 47 "space-reference" : "books",
Jip-jan Alunkel 8.7 48 "help-block" : "Choose the type of book you would like to add."
Jip-jan Alunkel 2.2 49 })
Jip-jan Alunkel 3.13 50
Jip-jan Alunkel 6.2 51 #createFormElement($booktype)
Jip-jan Alunkel 3.13 52
Jip-jan Alunkel 8.2 53 #set($book_title = {
54 "id" : "book_title",
Jip-jan Alunkel 3.9 55 "type" : "text",
Jip-jan Alunkel 7.2 56 "required" : "true",
Jip-jan Alunkel 8.7 57 "label" : "Title of the book",
Jip-jan Alunkel 8.2 58 "aria-label" : "Enter the title of the book",
Jip-jan Alunkel 8.7 59 "placeholder" : "Title",
Jip-jan Alunkel 8.2 60 "data-error-response-type" : "use_label_definite_1",
Jip-jan Alunkel 3.9 61 "data-query-type" : "XWQL.matchTitle",
Jip-jan Alunkel 6.1 62 "data-query-scope" : "books",
Jip-jan Alunkel 3.9 63 "data-query-list-type" : "suggest-negate",
Jip-jan Alunkel 8.8 64 "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_negate_list')",
Jip-jan Alunkel 3.9 65 "data-query-list-contents" : "value",
66 "data-create-page" : "true",
Jip-jan Alunkel 8.8 67 "help-block" : 'When providing a title of a common type of book, please also provide the authorʼs last name, viz. Boericke Materia Medica.'
Jip-jan Alunkel 3.9 68 })
Jip-jan Alunkel 3.13 69
Jip-jan Alunkel 8.4 70 #createFormElement($book_title)
Jip-jan Alunkel 3.9 71
Jip-jan Alunkel 8.12 72 #set($author = {
73 "id" : "author",
74 "type" : "text",
Jip-jan Alunkel 7.2 75 "required" : "true",
Jip-jan Alunkel 8.12 76 "label" : "Author of the book",
77 "aria-label" : "Enter the author of the book",
78 "placeholder" : "Author",
Jip-jan Alunkel 8.19 79 "data-error-response-type" : "use_label_definite_1",
Jip-jan Alunkel 8.12 80 "data-query-type" : "XWQL.matchObject",
81 "data-query-scope" : "books",
82 "data-query-list-type" : "suggest-select",
83 "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_select_list')",
84 "data-query-list-contents" : "value",
Jip-jan Alunkel 8.21 85 "data-query-list-editable" : "true",
Jip-jan Alunkel 3.24 86 "data-create-xobj" : "true",
Jip-jan Alunkel 6.1 87 "data-xobj-classname" : "books.WebHome",
Jip-jan Alunkel 8.12 88 "data-xobj-fieldname" : "author",
89 "help-block" : 'Select the author of this case.'
Jip-jan Alunkel 3.24 90 })
91
Jip-jan Alunkel 8.12 92 #createFormElement($author)
Jip-jan Alunkel 3.24 93
Jip-jan Alunkel 8.12 94 #set($publish_year = {
95 "id" : "publish_year",
96 "type" : "number",
97 "required" : "true",
98 "label" : "Year of publishing",
99 "aria-label" : "Enter the year of publishing",
100 "placeholder" : "Year",
101 "data-error-response-type" : "use_label_definite_1",
Jip-jan Alunkel 3.31 102 "data-create-xobj" : "true",
Jip-jan Alunkel 6.1 103 "data-xobj-classname" : "books.WebHome",
Jip-jan Alunkel 8.12 104 "data-xobj-fieldname" : "publish_year"
Jip-jan Alunkel 3.31 105 })
Jip-jan Alunkel 3.29 106
Jip-jan Alunkel 8.12 107 #createFormElement($publish_year)
Jip-jan Alunkel 3.33 108
Jip-jan Alunkel 8.18 109 #set($extra_info = {
110 "id" : "extra_info",
111 "type" : "checkbox",
112 "required" : "no",
113 "label" : "Extra information (optional)",
114 "value" : "yes"
115 })
116
117 #createFormElement($extra_info)
118
119 #createExpandStart("extra_info" "yes")
120
Jip-jan Alunkel 3.30 121 #createExpandEnd()
Jip-jan Alunkel 3.28 122
Jip-jan Alunkel 8.20 123 #set($submit = {
124 "id" : "create_book",
125 "button-text" : "Create book",
126 "help-block" : ""
127 })
128 #createSubmit($submit)
129
Jip-jan Alunkel 3.13 130 #createFormEnd()
131
Jip-jan Alunkel 3.16 132 {{/html}}
Jip-jan Alunkel 2.2 133 {{/velocity}}