Wiki source code of Books
Last modified by Jip-jan Alunkel on November 23, 10:59
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{include reference="assets.pagemaker.macros"/}} | ||
2 | |||
3 | {{velocity}} | ||
4 | #set($discard = $services.localization.use('document', 'assets.global.translations')) | ||
5 | #set($discard = $services.localization.use('document', 'assets.pagemaker.translations')) | ||
6 | #set($discard = $xwiki.ssx.use('assets.pagemaker.WebHome', {'minify' : false})) | ||
7 | #set($discard = $xwiki.jsx.use('assets.pagemaker.WebHome', {'minify' : false})) | ||
8 | |||
9 | {{html wiki="true" clean="false"}} | ||
10 | <p> | ||
11 | All about books | ||
12 | </p> | ||
13 | <h2 class="livetable">Overview of all books</h2> | ||
14 | <div class="livetable"> | ||
15 | |||
16 | #set ($columns = ["doc.title", "name", "doc.space"]) | ||
17 | #set ($columnsProperties = { | ||
18 | "doc.title": {"type": "text", "filterable" : true, "sortable": true, "link": "view"}, | ||
19 | "name": {"type": "text", "filterable" : true, "sortable": true, "headerClass": "author"}, | ||
20 | "doc.space": {"type": "text", "filterable" : true, "sortable": true, "headerClass": "category", "link": "space"} | ||
21 | }) | ||
22 | #set ($options = { | ||
23 | "className" : "books.Code.booksClass", | ||
24 | "translationPrefix" : "livetable.books.", | ||
25 | "extraParams": "&name_class=assets.pagemaker.classes.persons", | ||
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? | ||
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. | ||
36 | </p> | ||
37 | |||
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) | ||
46 | #set($booktype = { | ||
47 | "id" : "booktype", | ||
48 | "type" : "select", | ||
49 | "required" : "true", | ||
50 | "label" : "Type of book", | ||
51 | "aria-label" : "Select the type of book", | ||
52 | "placeholder" : "Type", | ||
53 | "data-error-response-type" : "use_label_definite_1", | ||
54 | "data-set-space" : "true", | ||
55 | "select-space-reference" : "books", | ||
56 | "help-block" : "Choose the type of book you would like to add." | ||
57 | }) | ||
58 | #createFormElement($booktype) | ||
59 | #set($book_title = { | ||
60 | "id" : "book_title", | ||
61 | "type" : "text", | ||
62 | "required" : "true", | ||
63 | "label" : "Title of the book", | ||
64 | "aria-label" : "Enter the title of the book", | ||
65 | "placeholder" : "Title", | ||
66 | "data-error-response-type" : "use_label_definite_1", | ||
67 | "data-query-type" : "XWQL.matchTitle", | ||
68 | "data-query-scope" : "books", | ||
69 | "data-query-list-type" : "suggest-negate", | ||
70 | "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_negate_list')", | ||
71 | "data-query-list-contents" : "value", | ||
72 | "data-create-page" : "true", | ||
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.' | ||
74 | }) | ||
75 | #createFormElement($book_title) | ||
76 | #set($author = { | ||
77 | "id" : "author", | ||
78 | "type" : "text", | ||
79 | "required" : "true", | ||
80 | "label" : "Author of the book", | ||
81 | "aria-label" : "Enter the author of the book", | ||
82 | "data-default-value": "", | ||
83 | "placeholder" : "$services.localization.render('cases.word.author.placeholder')", | ||
84 | "data-auto-first-capital" : "true", | ||
85 | "data-query-type" : "XWQL", | ||
86 | "data-query-reference" : "assets.pagemaker.XWQL.matchObject", | ||
87 | "data-query-scope" : "", | ||
88 | "data-query-list-type" : "suggest-select", | ||
89 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
90 | "data-query-list-contents" : "value", | ||
91 | "data-query-list-editable" : "true", | ||
92 | "data-create-xobj" : "true", | ||
93 | "data-xobj-classname" : "assets.pagemaker.classes.persons", | ||
94 | "data-xobj-fieldname" : "name", | ||
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", | ||
98 | "help-block" : 'Enter the last name of the author of this book. Choose the author from the list or create a new author.' | ||
99 | }) | ||
100 | #createFormElement($author) | ||
101 | #set($extra_info = { | ||
102 | "id" : "extra_info", | ||
103 | "type" : "checkbox", | ||
104 | "required" : "no", | ||
105 | "label" : "Extra information (optional)", | ||
106 | "value" : "", | ||
107 | "data-opener" : "true" | ||
108 | }) | ||
109 | #createFormElement($extra_info) | ||
110 | #createExpandStart($extra_info "1") | ||
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", | ||
120 | "data-xobj-classname" : "books.Code.booksClass", | ||
121 | "data-xobj-fieldname" : "publish_year" | ||
122 | }) | ||
123 | #createFormElement($publish_year) | ||
124 | #createExpandEnd() | ||
125 | #set($submit = { | ||
126 | "id" : "create_book", | ||
127 | "button-text" : "Create book", | ||
128 | "help-block" : "" | ||
129 | }) | ||
130 | #createSubmit($submit) | ||
131 | #set($form_end = { | ||
132 | "use_captcha": "false" | ||
133 | }) | ||
134 | #createFormEnd($form_end) | ||
135 | |||
136 | {{/html}} | ||
137 | {{/velocity}} |