Wiki source code of Books

Version 8.29 by Jip-jan Alunkel on April 17, 23:25

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 5.2 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}))
Jip-jan Alunkel 8.24 8
9 {{html wiki="true" clean="false"}}
Jip-jan Alunkel 8.22 10 <p>
11 All about books
12 </p>
13 <h2 class="livetable">Overview of all books</h2>
14 <div id="livetable">
Jip-jan Alunkel 3.13 15
Jip-jan Alunkel 8.22 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
Jip-jan Alunkel 6.3 37 #createFormStart("homeoworld_form" "book")
Jip-jan Alunkel 3.12 38
Jip-jan Alunkel 6.2 39 #set($booktype = {
40 "id" : "booktype",
Jip-jan Alunkel 2.2 41 "type" : "select",
Jip-jan Alunkel 7.2 42 "required" : "true",
Jip-jan Alunkel 6.2 43 "label" : "Type of book",
Jip-jan Alunkel 8.8 44 "aria-label" : "Select the type of book",
Jip-jan Alunkel 8.18 45 "placeholder" : "Type",
Jip-jan Alunkel 8.3 46 "data-error-response-type" : "use_label_definite_1",
Jip-jan Alunkel 2.2 47 "data-set-space" : "true",
Jip-jan Alunkel 8.28 48 "select-space-reference" : "books",
Jip-jan Alunkel 8.7 49 "help-block" : "Choose the type of book you would like to add."
Jip-jan Alunkel 2.2 50 })
Jip-jan Alunkel 3.13 51
Jip-jan Alunkel 6.2 52 #createFormElement($booktype)
Jip-jan Alunkel 3.13 53
Jip-jan Alunkel 8.2 54 #set($book_title = {
55 "id" : "book_title",
Jip-jan Alunkel 3.9 56 "type" : "text",
Jip-jan Alunkel 7.2 57 "required" : "true",
Jip-jan Alunkel 8.7 58 "label" : "Title of the book",
Jip-jan Alunkel 8.2 59 "aria-label" : "Enter the title of the book",
Jip-jan Alunkel 8.7 60 "placeholder" : "Title",
Jip-jan Alunkel 8.2 61 "data-error-response-type" : "use_label_definite_1",
Jip-jan Alunkel 3.9 62 "data-query-type" : "XWQL.matchTitle",
Jip-jan Alunkel 8.29 63 "data-query-scope" : "books",
Jip-jan Alunkel 3.9 64 "data-query-list-type" : "suggest-negate",
Jip-jan Alunkel 8.8 65 "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_negate_list')",
Jip-jan Alunkel 3.9 66 "data-query-list-contents" : "value",
67 "data-create-page" : "true",
Jip-jan Alunkel 8.8 68 "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 69 })
Jip-jan Alunkel 3.13 70
Jip-jan Alunkel 8.4 71 #createFormElement($book_title)
Jip-jan Alunkel 3.9 72
Jip-jan Alunkel 8.12 73 #set($author = {
74 "id" : "author",
75 "type" : "text",
Jip-jan Alunkel 7.2 76 "required" : "true",
Jip-jan Alunkel 8.12 77 "label" : "Author of the book",
78 "aria-label" : "Enter the author of the book",
79 "placeholder" : "Author",
Jip-jan Alunkel 8.19 80 "data-error-response-type" : "use_label_definite_1",
Jip-jan Alunkel 8.12 81 "data-query-type" : "XWQL.matchObject",
82 "data-query-scope" : "books",
83 "data-query-list-type" : "suggest-select",
84 "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_select_list')",
85 "data-query-list-contents" : "value",
Jip-jan Alunkel 8.21 86 "data-query-list-editable" : "true",
Jip-jan Alunkel 3.24 87 "data-create-xobj" : "true",
Jip-jan Alunkel 6.1 88 "data-xobj-classname" : "books.WebHome",
Jip-jan Alunkel 8.12 89 "data-xobj-fieldname" : "author",
90 "help-block" : 'Select the author of this case.'
Jip-jan Alunkel 3.24 91 })
92
Jip-jan Alunkel 8.12 93 #createFormElement($author)
Jip-jan Alunkel 3.24 94
Jip-jan Alunkel 8.12 95 #set($publish_year = {
96 "id" : "publish_year",
97 "type" : "number",
98 "required" : "true",
99 "label" : "Year of publishing",
100 "aria-label" : "Enter the year of publishing",
101 "placeholder" : "Year",
102 "data-error-response-type" : "use_label_definite_1",
Jip-jan Alunkel 3.31 103 "data-create-xobj" : "true",
Jip-jan Alunkel 6.1 104 "data-xobj-classname" : "books.WebHome",
Jip-jan Alunkel 8.12 105 "data-xobj-fieldname" : "publish_year"
Jip-jan Alunkel 3.31 106 })
Jip-jan Alunkel 3.29 107
Jip-jan Alunkel 8.12 108 #createFormElement($publish_year)
Jip-jan Alunkel 3.33 109
Jip-jan Alunkel 8.18 110 #set($extra_info = {
111 "id" : "extra_info",
112 "type" : "checkbox",
113 "required" : "no",
114 "label" : "Extra information (optional)",
115 "value" : "yes"
116 })
117
118 #createFormElement($extra_info)
119
120 #createExpandStart("extra_info" "yes")
121
Jip-jan Alunkel 3.30 122 #createExpandEnd()
Jip-jan Alunkel 3.28 123
Jip-jan Alunkel 8.20 124 #set($submit = {
125 "id" : "create_book",
126 "button-text" : "Create book",
127 "help-block" : ""
128 })
129 #createSubmit($submit)
130
Jip-jan Alunkel 3.13 131 #createFormEnd()
132
Jip-jan Alunkel 3.16 133 {{/html}}
Jip-jan Alunkel 2.2 134 {{/velocity}}