Wiki source code of Books
Version 8.23 by Jip-jan Alunkel on April 11, 23:53
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
8.23 | 1 | {{include reference="assets.formMaker.macros" /}} |
2 | |||
![]() |
3.11 | 3 | {{velocity}} |
![]() |
8.23 | 4 | {{html}} |
![]() |
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})) | ||
![]() |
8.22 | 9 | <p> |
10 | All about books | ||
11 | </p> | ||
12 | <h2 class="livetable">Overview of all books</h2> | ||
13 | <div id="livetable"> | ||
![]() |
3.13 | 14 | |
![]() |
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 | |||
![]() |
6.3 | 36 | #createFormStart("homeoworld_form" "book") |
![]() |
3.12 | 37 | |
![]() |
6.2 | 38 | #set($booktype = { |
39 | "id" : "booktype", | ||
![]() |
2.2 | 40 | "type" : "select", |
![]() |
7.2 | 41 | "required" : "true", |
![]() |
6.2 | 42 | "label" : "Type of book", |
![]() |
8.8 | 43 | "aria-label" : "Select the type of book", |
![]() |
8.18 | 44 | "placeholder" : "Type", |
![]() |
8.3 | 45 | "data-error-response-type" : "use_label_definite_1", |
![]() |
2.2 | 46 | "data-set-space" : "true", |
![]() |
6.1 | 47 | "space-reference" : "books", |
![]() |
8.7 | 48 | "help-block" : "Choose the type of book you would like to add." |
![]() |
2.2 | 49 | }) |
![]() |
3.13 | 50 | |
![]() |
6.2 | 51 | #createFormElement($booktype) |
![]() |
3.13 | 52 | |
![]() |
8.2 | 53 | #set($book_title = { |
54 | "id" : "book_title", | ||
![]() |
3.9 | 55 | "type" : "text", |
![]() |
7.2 | 56 | "required" : "true", |
![]() |
8.7 | 57 | "label" : "Title of the book", |
![]() |
8.2 | 58 | "aria-label" : "Enter the title of the book", |
![]() |
8.7 | 59 | "placeholder" : "Title", |
![]() |
8.2 | 60 | "data-error-response-type" : "use_label_definite_1", |
![]() |
3.9 | 61 | "data-query-type" : "XWQL.matchTitle", |
![]() |
6.1 | 62 | "data-query-scope" : "books", |
![]() |
3.9 | 63 | "data-query-list-type" : "suggest-negate", |
![]() |
8.8 | 64 | "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_negate_list')", |
![]() |
3.9 | 65 | "data-query-list-contents" : "value", |
66 | "data-create-page" : "true", | ||
![]() |
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.' |
![]() |
3.9 | 68 | }) |
![]() |
3.13 | 69 | |
![]() |
8.4 | 70 | #createFormElement($book_title) |
![]() |
3.9 | 71 | |
![]() |
8.12 | 72 | #set($author = { |
73 | "id" : "author", | ||
74 | "type" : "text", | ||
![]() |
7.2 | 75 | "required" : "true", |
![]() |
8.12 | 76 | "label" : "Author of the book", |
77 | "aria-label" : "Enter the author of the book", | ||
78 | "placeholder" : "Author", | ||
![]() |
8.19 | 79 | "data-error-response-type" : "use_label_definite_1", |
![]() |
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", | ||
![]() |
8.21 | 85 | "data-query-list-editable" : "true", |
![]() |
3.24 | 86 | "data-create-xobj" : "true", |
![]() |
6.1 | 87 | "data-xobj-classname" : "books.WebHome", |
![]() |
8.12 | 88 | "data-xobj-fieldname" : "author", |
89 | "help-block" : 'Select the author of this case.' | ||
![]() |
3.24 | 90 | }) |
91 | |||
![]() |
8.12 | 92 | #createFormElement($author) |
![]() |
3.24 | 93 | |
![]() |
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", | ||
![]() |
3.31 | 102 | "data-create-xobj" : "true", |
![]() |
6.1 | 103 | "data-xobj-classname" : "books.WebHome", |
![]() |
8.12 | 104 | "data-xobj-fieldname" : "publish_year" |
![]() |
3.31 | 105 | }) |
![]() |
3.29 | 106 | |
![]() |
8.12 | 107 | #createFormElement($publish_year) |
![]() |
3.33 | 108 | |
![]() |
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 | |||
![]() |
3.30 | 121 | #createExpandEnd() |
![]() |
3.28 | 122 | |
![]() |
8.20 | 123 | #set($submit = { |
124 | "id" : "create_book", | ||
125 | "button-text" : "Create book", | ||
126 | "help-block" : "" | ||
127 | }) | ||
128 | #createSubmit($submit) | ||
129 | |||
![]() |
3.13 | 130 | #createFormEnd() |
131 | |||
![]() |
3.16 | 132 | {{/html}} |
![]() |
2.2 | 133 | {{/velocity}} |