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