Wiki source code of Books
Version 9.9 by Jip-jan Alunkel on August 30, 22:11
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.pagemaker.translations')) | ||
5 | #set($discard = $xwiki.ssx.use('assets.pagemaker.WebHome', {'minify' : false})) | ||
6 | #set($discard = $xwiki.jsx.use('assets.pagemaker.WebHome', {'minify' : false})) | ||
7 | |||
8 | {{html wiki="true" clean="false"}} | ||
9 | <p> | ||
10 | All about books | ||
11 | </p> | ||
12 | <h2 class="livetable">Overview of all books</h2> | ||
13 | <div class="livetable"> | ||
14 | |||
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 | |||
36 | #createFormStart("homeoworld_form" "book") | ||
37 | #set($booktype = { | ||
38 | "id" : "booktype", | ||
39 | "type" : "select", | ||
40 | "required" : "true", | ||
41 | "label" : "Type of book", | ||
42 | "aria-label" : "Select the type of book", | ||
43 | "placeholder" : "Type", | ||
44 | "data-error-response-type" : "use_label_definite_1", | ||
45 | "data-set-space" : "true", | ||
46 | "select-space-reference" : "books", | ||
47 | "help-block" : "Choose the type of book you would like to add." | ||
48 | }) | ||
49 | #createFormElement($booktype) | ||
50 | #set($book_title = { | ||
51 | "id" : "book_title", | ||
52 | "type" : "text", | ||
53 | "required" : "true", | ||
54 | "label" : "Title of the book", | ||
55 | "aria-label" : "Enter the title of the book", | ||
56 | "placeholder" : "Title", | ||
57 | "data-error-response-type" : "use_label_definite_1", | ||
58 | "data-query-type" : "XWQL.matchTitle", | ||
59 | "data-query-scope" : "books", | ||
60 | "data-query-list-type" : "suggest-negate", | ||
61 | "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_negate_list')", | ||
62 | "data-query-list-contents" : "value", | ||
63 | "data-create-page" : "true", | ||
64 | "help-block" : 'When providing a title of a common type of book, please also provide the authorʼs last name, viz. Boericke Materia Medica.' | ||
65 | }) | ||
66 | #createFormElement($book_title) | ||
67 | #set($author = { | ||
68 | "id" : "author", | ||
69 | "type" : "text", | ||
70 | "required" : "true", | ||
71 | "label" : "Author of the book", | ||
72 | "aria-label" : "Enter the author of the book", | ||
73 | "placeholder" : "$services.localization.render('cases.word.author.placeholder')", | ||
74 | "data-auto-first-capital" : "true", | ||
75 | "data-query-type" : "XWQL.matchObject", | ||
76 | "data-query-reference" : "assets.pagemaker.XWQL.matchObject", | ||
77 | "data-query-scope" : "books", | ||
78 | "data-query-list-type" : "suggest-select", | ||
79 | "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')", | ||
80 | "data-query-list-contents" : "value", | ||
81 | "data-query-list-editable" : "true", | ||
82 | "data-create-xobj" : "true", | ||
83 | "data-xobj-classname" : "assets.pagemaker.classes.persons", | ||
84 | "data-xobj-fieldname" : "author", | ||
85 | "data-modal-input" : ["$services.localization.render('global.word.lastname')", "$services.localization.render('global.word.firstname')"], | ||
86 | "data-modal-input-glue": ", ", | ||
87 | "data-error-response-type" : "use_label_definite_1", | ||
88 | "help-block" : 'Select the author of this case.' | ||
89 | }) | ||
90 | #createFormElement($author) | ||
91 | #set($extra_info = { | ||
92 | "id" : "extra_info", | ||
93 | "type" : "checkbox", | ||
94 | "required" : "no", | ||
95 | "label" : "Extra information (optional)", | ||
96 | "value" : "1", | ||
97 | "data-opener" : "true" | ||
98 | }) | ||
99 | #createFormElement($extra_info) | ||
100 | #createExpandStart($extra_info "1") | ||
101 | #set($publish_year = { | ||
102 | "id" : "publish_year", | ||
103 | "type" : "number", | ||
104 | "required" : "false", | ||
105 | "label" : "Year of publishing", | ||
106 | "aria-label" : "Enter the year of publishing", | ||
107 | "placeholder" : "Year", | ||
108 | "data-error-response-type" : "use_label_definite_1", | ||
109 | "data-create-xobj" : "true", | ||
110 | "data-xobj-classname" : "books.WebHome", | ||
111 | "data-xobj-fieldname" : "publish_year" | ||
112 | }) | ||
113 | #createFormElement($publish_year) | ||
114 | #createExpandEnd() | ||
115 | #set($submit = { | ||
116 | "id" : "create_book", | ||
117 | "button-text" : "Create book", | ||
118 | "help-block" : "" | ||
119 | }) | ||
120 | #createSubmit($submit) | ||
121 | #createFormEnd() | ||
122 | |||
123 | {{/html}} | ||
124 | {{/velocity}} |