Wiki source code of Books
Version 8.31 by Jip-jan Alunkel on April 17, 23:29
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") |
![]() |
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", |
![]() |
8.28 | 47 | "select-space-reference" : "books", |
![]() |
8.7 | 48 | "help-block" : "Choose the type of book you would like to add." |
![]() |
2.2 | 49 | }) |
![]() |
6.2 | 50 | #createFormElement($booktype) |
![]() |
8.2 | 51 | #set($book_title = { |
52 | "id" : "book_title", | ||
![]() |
3.9 | 53 | "type" : "text", |
![]() |
7.2 | 54 | "required" : "true", |
![]() |
8.7 | 55 | "label" : "Title of the book", |
![]() |
8.2 | 56 | "aria-label" : "Enter the title of the book", |
![]() |
8.7 | 57 | "placeholder" : "Title", |
![]() |
8.2 | 58 | "data-error-response-type" : "use_label_definite_1", |
![]() |
3.9 | 59 | "data-query-type" : "XWQL.matchTitle", |
![]() |
8.29 | 60 | "data-query-scope" : "books", |
![]() |
3.9 | 61 | "data-query-list-type" : "suggest-negate", |
![]() |
8.8 | 62 | "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_negate_list')", |
![]() |
3.9 | 63 | "data-query-list-contents" : "value", |
64 | "data-create-page" : "true", | ||
![]() |
8.8 | 65 | "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 | 66 | }) |
![]() |
8.4 | 67 | #createFormElement($book_title) |
![]() |
8.12 | 68 | #set($author = { |
69 | "id" : "author", | ||
70 | "type" : "text", | ||
![]() |
7.2 | 71 | "required" : "true", |
![]() |
8.12 | 72 | "label" : "Author of the book", |
73 | "aria-label" : "Enter the author of the book", | ||
74 | "placeholder" : "Author", | ||
![]() |
8.19 | 75 | "data-error-response-type" : "use_label_definite_1", |
![]() |
8.12 | 76 | "data-query-type" : "XWQL.matchObject", |
77 | "data-query-scope" : "books", | ||
78 | "data-query-list-type" : "suggest-select", | ||
79 | "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_select_list')", | ||
80 | "data-query-list-contents" : "value", | ||
![]() |
8.21 | 81 | "data-query-list-editable" : "true", |
![]() |
3.24 | 82 | "data-create-xobj" : "true", |
![]() |
6.1 | 83 | "data-xobj-classname" : "books.WebHome", |
![]() |
8.12 | 84 | "data-xobj-fieldname" : "author", |
85 | "help-block" : 'Select the author of this case.' | ||
![]() |
3.24 | 86 | }) |
![]() |
8.12 | 87 | #createFormElement($author) |
![]() |
8.30 | 88 | #set($extra_info = { |
89 | "id" : "extra_info", | ||
90 | "type" : "checkbox", | ||
91 | "required" : "no", | ||
92 | "label" : "Extra information (optional)", | ||
93 | "value" : "yes" | ||
94 | }) | ||
95 | #createFormElement($extra_info) | ||
96 | #createExpandStart("extra_info" "yes") | ||
![]() |
8.12 | 97 | #set($publish_year = { |
98 | "id" : "publish_year", | ||
99 | "type" : "number", | ||
![]() |
8.31 | 100 | "required" : "false", |
![]() |
8.12 | 101 | "label" : "Year of publishing", |
102 | "aria-label" : "Enter the year of publishing", | ||
103 | "placeholder" : "Year", | ||
104 | "data-error-response-type" : "use_label_definite_1", | ||
![]() |
3.31 | 105 | "data-create-xobj" : "true", |
![]() |
6.1 | 106 | "data-xobj-classname" : "books.WebHome", |
![]() |
8.12 | 107 | "data-xobj-fieldname" : "publish_year" |
![]() |
3.31 | 108 | }) |
![]() |
8.12 | 109 | #createFormElement($publish_year) |
![]() |
3.30 | 110 | #createExpandEnd() |
![]() |
8.20 | 111 | #set($submit = { |
112 | "id" : "create_book", | ||
113 | "button-text" : "Create book", | ||
114 | "help-block" : "" | ||
115 | }) | ||
116 | #createSubmit($submit) | ||
![]() |
3.13 | 117 | #createFormEnd() |
118 | |||
![]() |
3.16 | 119 | {{/html}} |
![]() |
2.2 | 120 | {{/velocity}} |