Исходный код вики Books

Версия 9.16 от Jip-jan Alunkel на августа 31, 02:07

Последние авторы
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 #set($form_start = {
37 "id": "homeoworld_form",
38 "product": "book",
39 "method": "post",
40 "url": "",
41 "use_captcha": "false"
42 })
43 #createFormStart($form_start)
44 #set($booktype = {
45 "id" : "booktype",
46 "type" : "select",
47 "required" : "true",
48 "label" : "Type of book",
49 "aria-label" : "Select the type of book",
50 "placeholder" : "Type",
51 "data-error-response-type" : "use_label_definite_1",
52 "data-set-space" : "true",
53 "select-space-reference" : "books",
54 "help-block" : "Choose the type of book you would like to add."
55 })
56 #createFormElement($booktype)
57 #set($book_title = {
58 "id" : "book_title",
59 "type" : "text",
60 "required" : "true",
61 "label" : "Title of the book",
62 "aria-label" : "Enter the title of the book",
63 "placeholder" : "Title",
64 "data-error-response-type" : "use_label_definite_1",
65 "data-query-type" : "XWQL.matchTitle",
66 "data-query-scope" : "books",
67 "data-query-list-type" : "suggest-negate",
68 "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_negate_list')",
69 "data-query-list-contents" : "value",
70 "data-create-page" : "true",
71 "help-block" : 'When providing a title of a common type of book, please also provide the authorʼs last name, viz. Boericke Materia Medica.'
72 })
73 #createFormElement($book_title)
74 #set($author = {
75 "id" : "author",
76 "type" : "text",
77 "required" : "true",
78 "label" : "Author of the book",
79 "aria-label" : "Enter the author of the book",
80 "data-default-value": "",
81 "placeholder" : "$services.localization.render('cases.word.author.placeholder')",
82 "data-auto-first-capital" : "true",
83 "data-query-type" : "XWQL",
84 "data-query-reference" : "assets.pagemaker.XWQL.matchObject",
85 "data-query-scope" : "",
86 "data-query-list-type" : "suggest-select",
87 "data-query-list-header" : "$services.localization.render('pagemaker.line.suggest_select_list')",
88 "data-query-list-contents" : "value",
89 "data-query-list-editable" : "true",
90 "data-create-xobj" : "true",
91 "data-xobj-classname" : "assets.pagemaker.classes.persons",
92 "data-xobj-fieldname" : "name",
93 "data-modal-input" : ["$services.localization.render('global.word.lastname')", "$services.localization.render('global.word.firstname')"],
94 "data-modal-input-glue": ", ",
95 "data-error-response-type" : "use_label_definite_1",
96 "help-block" : 'Enter the last name of the author of this case. Choose the author from the list or create a new author.'
97 })
98 #createFormElement($author)
99 #set($extra_info = {
100 "id" : "extra_info",
101 "type" : "checkbox",
102 "required" : "no",
103 "label" : "Extra information (optional)",
104 "value" : "1",
105 "data-opener" : "true"
106 })
107 #createFormElement($extra_info)
108 #createExpandStart($extra_info "1")
109 #set($publish_year = {
110 "id" : "publish_year",
111 "type" : "number",
112 "required" : "false",
113 "label" : "Year of publishing",
114 "aria-label" : "Enter the year of publishing",
115 "placeholder" : "Year",
116 "data-error-response-type" : "use_label_definite_1",
117 "data-create-xobj" : "true",
118 "data-xobj-classname" : "books.WebHome",
119 "data-xobj-fieldname" : "publish_year"
120 })
121 #createFormElement($publish_year)
122 #createExpandEnd()
123 #set($submit = {
124 "id" : "create_book",
125 "button-text" : "Create book",
126 "help-block" : ""
127 })
128 #createSubmit($submit)
129 #set($form_end = {
130 "use_captcha": "false"
131 })
132 #createFormEnd($form_end)
133
134 {{/html}}
135 {{/velocity}}