Wiki source code of Books
Last modified by Jip-jan Alunkel on November 23, 10:59
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
9.1 | 1 | {{include reference="assets.pagemaker.macros"/}} |
![]() |
8.23 | 2 | |
![]() |
3.11 | 3 | {{velocity}} |
![]() |
9.20 | 4 | #set($discard = $services.localization.use('document', 'assets.global.translations')) |
![]() |
9.3 | 5 | #set($discard = $services.localization.use('document', 'assets.pagemaker.translations')) |
![]() |
9.6 | 6 | #set($discard = $xwiki.ssx.use('assets.pagemaker.WebHome', {'minify' : false})) |
![]() |
9.3 | 7 | #set($discard = $xwiki.jsx.use('assets.pagemaker.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> | ||
![]() |
9.2 | 14 | <div class="livetable"> |
![]() |
3.13 | 15 | |
![]() |
10.4 | 16 | #set ($columns = ["doc.title", "name", "doc.space"]) |
![]() |
8.22 | 17 | #set ($columnsProperties = { |
![]() |
10.4 | 18 | "doc.title": {"type": "text", "filterable" : true, "sortable": true, "link": "view"}, |
![]() |
9.23 | 19 | "name": {"type": "text", "filterable" : true, "sortable": true, "headerClass": "author"}, |
20 | "doc.space": {"type": "text", "filterable" : true, "sortable": true, "headerClass": "category", "link": "space"} | ||
![]() |
8.22 | 21 | }) |
22 | #set ($options = { | ||
![]() |
10.1 | 23 | "className" : "books.Code.booksClass", |
![]() |
9.21 | 24 | "translationPrefix" : "livetable.books.", |
![]() |
9.18 | 25 | "extraParams": "&name_class=assets.pagemaker.classes.persons", |
![]() |
8.22 | 26 | "queryFilters" : "currentlanguage", |
27 | "rowCount": 10 | ||
28 | }) | ||
29 | #livetable("books" $columns $columnsProperties $options) | ||
30 | |||
31 | </div> | ||
32 | <h3>Add a book to this wiki</h3> | ||
33 | <p> | ||
34 | Do you know of any books that can be of value to people who would like to learn more about homeopathy? | ||
![]() |
9.24 | 35 | Please feel free to share these books with our readers. However, to make sure your book is being filed correctly it is necessary that you answer a few simple questions about the book. |
![]() |
8.22 | 36 | </p> |
37 | |||
![]() |
9.16 | 38 | #set($form_start = { |
39 | "id": "homeoworld_form", | ||
40 | "product": "book", | ||
41 | "method": "post", | ||
42 | "url": "", | ||
43 | "use_captcha": "false" | ||
44 | }) | ||
45 | #createFormStart($form_start) | ||
![]() |
6.2 | 46 | #set($booktype = { |
47 | "id" : "booktype", | ||
![]() |
2.2 | 48 | "type" : "select", |
![]() |
7.2 | 49 | "required" : "true", |
![]() |
6.2 | 50 | "label" : "Type of book", |
![]() |
8.8 | 51 | "aria-label" : "Select the type of book", |
![]() |
8.18 | 52 | "placeholder" : "Type", |
![]() |
8.3 | 53 | "data-error-response-type" : "use_label_definite_1", |
![]() |
2.2 | 54 | "data-set-space" : "true", |
![]() |
8.28 | 55 | "select-space-reference" : "books", |
![]() |
8.7 | 56 | "help-block" : "Choose the type of book you would like to add." |
![]() |
2.2 | 57 | }) |
![]() |
6.2 | 58 | #createFormElement($booktype) |
![]() |
8.2 | 59 | #set($book_title = { |
60 | "id" : "book_title", | ||
![]() |
3.9 | 61 | "type" : "text", |
![]() |
7.2 | 62 | "required" : "true", |
![]() |
8.7 | 63 | "label" : "Title of the book", |
![]() |
8.2 | 64 | "aria-label" : "Enter the title of the book", |
![]() |
8.7 | 65 | "placeholder" : "Title", |
![]() |
8.2 | 66 | "data-error-response-type" : "use_label_definite_1", |
![]() |
3.9 | 67 | "data-query-type" : "XWQL.matchTitle", |
![]() |
8.29 | 68 | "data-query-scope" : "books", |
![]() |
3.9 | 69 | "data-query-list-type" : "suggest-negate", |
![]() |
8.8 | 70 | "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_negate_list')", |
![]() |
3.9 | 71 | "data-query-list-contents" : "value", |
72 | "data-create-page" : "true", | ||
![]() |
8.8 | 73 | "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 | 74 | }) |
![]() |
8.4 | 75 | #createFormElement($book_title) |
![]() |
8.12 | 76 | #set($author = { |
77 | "id" : "author", | ||
78 | "type" : "text", | ||
![]() |
7.2 | 79 | "required" : "true", |
![]() |
8.12 | 80 | "label" : "Author of the book", |
81 | "aria-label" : "Enter the author of the book", | ||
![]() |
9.14 | 82 | "data-default-value": "", |
![]() |
9.9 | 83 | "placeholder" : "$services.localization.render('cases.word.author.placeholder')", |
84 | "data-auto-first-capital" : "true", | ||
![]() |
9.15 | 85 | "data-query-type" : "XWQL", |
![]() |
9.9 | 86 | "data-query-reference" : "assets.pagemaker.XWQL.matchObject", |
![]() |
9.10 | 87 | "data-query-scope" : "", |
![]() |
8.12 | 88 | "data-query-list-type" : "suggest-select", |
![]() |
9.9 | 89 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", |
![]() |
8.12 | 90 | "data-query-list-contents" : "value", |
![]() |
8.21 | 91 | "data-query-list-editable" : "true", |
![]() |
3.24 | 92 | "data-create-xobj" : "true", |
![]() |
9.9 | 93 | "data-xobj-classname" : "assets.pagemaker.classes.persons", |
![]() |
9.10 | 94 | "data-xobj-fieldname" : "name", |
![]() |
9.9 | 95 | "data-modal-input" : ["$services.localization.render('global.word.lastname')", "$services.localization.render('global.word.firstname')"], |
96 | "data-modal-input-glue": ", ", | ||
97 | "data-error-response-type" : "use_label_definite_1", | ||
![]() |
9.19 | 98 | "help-block" : 'Enter the last name of the author of this book. Choose the author from the list or create a new author.' |
![]() |
3.24 | 99 | }) |
![]() |
8.12 | 100 | #createFormElement($author) |
![]() |
8.30 | 101 | #set($extra_info = { |
102 | "id" : "extra_info", | ||
103 | "type" : "checkbox", | ||
104 | "required" : "no", | ||
105 | "label" : "Extra information (optional)", | ||
![]() |
9.25 | 106 | "value" : "", |
![]() |
9.4 | 107 | "data-opener" : "true" |
![]() |
8.30 | 108 | }) |
109 | #createFormElement($extra_info) | ||
![]() |
9.7 | 110 | #createExpandStart($extra_info "1") |
![]() |
9.6 | 111 | #set($publish_year = { |
112 | "id" : "publish_year", | ||
113 | "type" : "number", | ||
114 | "required" : "false", | ||
115 | "label" : "Year of publishing", | ||
116 | "aria-label" : "Enter the year of publishing", | ||
117 | "placeholder" : "Year", | ||
118 | "data-error-response-type" : "use_label_definite_1", | ||
119 | "data-create-xobj" : "true", | ||
![]() |
10.1 | 120 | "data-xobj-classname" : "books.Code.booksClass", |
![]() |
9.6 | 121 | "data-xobj-fieldname" : "publish_year" |
122 | }) | ||
123 | #createFormElement($publish_year) | ||
![]() |
3.30 | 124 | #createExpandEnd() |
![]() |
8.20 | 125 | #set($submit = { |
126 | "id" : "create_book", | ||
127 | "button-text" : "Create book", | ||
128 | "help-block" : "" | ||
129 | }) | ||
130 | #createSubmit($submit) | ||
![]() |
9.16 | 131 | #set($form_end = { |
132 | "use_captcha": "false" | ||
133 | }) | ||
134 | #createFormEnd($form_end) | ||
![]() |
3.13 | 135 | |
![]() |
3.16 | 136 | {{/html}} |
![]() |
2.2 | 137 | {{/velocity}} |