Wijzigen voor document Books

Laatst gewijzigd door Jip-jan Alunkel op november 23, 10:59

Van versie 8.18
gewijzigd door Jip-jan Alunkel
op april 10, 17:03
Opmerking bij wijziging: Updated class property
Naar versie 9.5
gewijzigd door Jip-jan Alunkel
op augustus 30, 21:58
Opmerking bij wijziging: Renamed back-links.

Samenvatting

Details

Paginaeigenschappen
Inhoud
... ... @@ -1,19 +1,39 @@
1 +{{include reference="assets.pagemaker.macros"/}}
2 +
1 1  {{velocity}}
2 -#set($discard = $services.localization.use('document', 'cases.Code.translations'))
3 -#set($discard = $services.localization.use('document', 'assets.formMaker.translations'))
4 -#set($discard = $xwiki.ssx.use('assets.formMaker.WebHome'))
5 -#set($discard = $xwiki.jsx.use('assets.formMaker.WebHome', {'minify' : false}))
6 -{{/velocity}}
4 +#set($discard = $services.localization.use('document', 'assets.pagemaker.translations'))
5 +#set($discard = $xwiki.ssx.use('assets.pagemaker.WebHome'))
6 +#set($discard = $xwiki.jsx.use('assets.pagemaker.WebHome', {'minify' : false}))
7 7  
8 +{{html wiki="true" clean="false"}}
9 +<p>
8 8  All about books
11 +</p>
12 +<h2 class="livetable">Overview of all books</h2>
13 +<div class="livetable">
9 9  
10 -{{include reference="assets.formMaker.macros" /}}
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)
11 11  
12 -{{velocity}}
13 -{{html}}
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>
14 14  
15 15  #createFormStart("homeoworld_form" "book")
16 -
17 17  #set($booktype = {
18 18   "id" : "booktype",
19 19   "type" : "select",
... ... @@ -23,12 +23,10 @@
23 23   "placeholder" : "Type",
24 24   "data-error-response-type" : "use_label_definite_1",
25 25   "data-set-space" : "true",
26 - "space-reference" : "books",
46 + "select-space-reference" : "books",
27 27   "help-block" : "Choose the type of book you would like to add."
28 28  })
29 -
30 30  #createFormElement($booktype)
31 -
32 32  #set($book_title = {
33 33   "id" : "book_title",
34 34   "type" : "text",
... ... @@ -45,9 +45,7 @@
45 45   "data-create-page" : "true",
46 46   "help-block" : 'When providing a title of a common type of book, please also provide the authorʼs last name, viz. Boericke Materia Medica.'
47 47  })
48 -
49 49  #createFormElement($book_title)
50 -
51 51  #set($author = {
52 52   "id" : "author",
53 53   "type" : "text",
... ... @@ -55,24 +55,33 @@
55 55   "label" : "Author of the book",
56 56   "aria-label" : "Enter the author of the book",
57 57   "placeholder" : "Author",
74 + "data-error-response-type" : "use_label_definite_1",
58 58   "data-query-type" : "XWQL.matchObject",
59 59   "data-query-scope" : "books",
60 60   "data-query-list-type" : "suggest-select",
61 61   "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_select_list')",
62 62   "data-query-list-contents" : "value",
63 - "data-query-list-editable" : "false",
80 + "data-query-list-editable" : "true",
64 64   "data-create-xobj" : "true",
65 65   "data-xobj-classname" : "books.WebHome",
66 66   "data-xobj-fieldname" : "author",
67 67   "help-block" : 'Select the author of this case.'
68 68  })
69 -
70 70  #createFormElement($author)
71 -
87 +#set($extra_info = {
88 + "id" : "extra_info",
89 + "type" : "checkbox",
90 + "required" : "no",
91 + "label" : "Extra information (optional)",
92 + "value" : "yes",
93 + "data-opener" : "true"
94 +})
95 +#createFormElement($extra_info)
96 +#createExpandStart($extra_info "yes")
72 72  #set($publish_year = {
73 73   "id" : "publish_year",
74 74   "type" : "number",
75 - "required" : "true",
100 + "required" : "false",
76 76   "label" : "Year of publishing",
77 77   "aria-label" : "Enter the year of publishing",
78 78   "placeholder" : "Year",
... ... @@ -81,23 +81,14 @@
81 81   "data-xobj-classname" : "books.WebHome",
82 82   "data-xobj-fieldname" : "publish_year"
83 83  })
84 -
85 85  #createFormElement($publish_year)
86 -
87 -#set($extra_info = {
88 - "id" : "extra_info",
89 - "type" : "checkbox",
90 - "required" : "no",
91 - "label" : "Extra information (optional)",
92 - "value" : "yes"
93 -})
94 -
95 -#createFormElement($extra_info)
96 -
97 -#createExpandStart("extra_info" "yes")
98 -
99 99  #createExpandEnd()
100 -
111 +#set($submit = {
112 + "id" : "create_book",
113 + "button-text" : "Create book",
114 + "help-block" : ""
115 +})
116 +#createSubmit($submit)
101 101  #createFormEnd()
102 102  
103 103  {{/html}}