Changes for page Books

Last modified by Jip-jan Alunkel on November 23, 10:59

From version 8.11
edited by Jip-jan Alunkel
on April 10, 16:32
Change comment: Added class property
To version 9.1
edited by Jip-jan Alunkel
on June 28, 20:27
Change comment: Renamed back-links.

Summary

Details

Page properties
Content
... ... @@ -1,19 +1,40 @@
1 +{{include reference="assets.pagemaker.macros"/}}
2 +
1 1  {{velocity}}
2 2  #set($discard = $services.localization.use('document', 'cases.Code.translations'))
3 3  #set($discard = $services.localization.use('document', 'assets.formMaker.translations'))
4 4  #set($discard = $xwiki.ssx.use('assets.formMaker.WebHome'))
5 5  #set($discard = $xwiki.jsx.use('assets.formMaker.WebHome', {'minify' : false}))
6 -{{/velocity}}
7 7  
9 +{{html wiki="true" clean="false"}}
10 +<p>
8 8  All about books
12 +</p>
13 +<h2 class="livetable">Overview of all books</h2>
14 +<div id="livetable">
9 9  
10 -{{include reference="assets.formMaker.macros" /}}
16 +#set ($columns = ["doc.title", "author", "doc.space"])
17 +#set ($columnsProperties = {
18 + "doc.title": {"type": "text", "filterable" : true, "sortable": true, "link": "view"},
19 + "remedy" : {"type": "text", "filterable" : true, "sortable": true, "size" : 4},
20 + "doc.space" : {"type": "text", "filterable" : true, "sortable": true, "size" : 4, "link": "space"}
21 +})
22 +#set ($options = {
23 + "className" : "books.WebHome",
24 + "translationPrefix" : "books.livetable.",
25 + "queryFilters" : "currentlanguage",
26 + "rowCount": 10
27 +})
28 +#livetable("books" $columns $columnsProperties $options)
11 11  
12 -{{velocity}}
13 -{{html}}
30 +</div>
31 +<h3>Add a book to this wiki</h3>
32 +<p>
33 + Do you know of any books that can be of value to people who would like to learn more about homeopathy?
34 + 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.
35 +</p>
14 14  
15 15  #createFormStart("homeoworld_form" "book")
16 -
17 17  #set($booktype = {
18 18   "id" : "booktype",
19 19   "type" : "select",
... ... @@ -20,15 +20,13 @@
20 20   "required" : "true",
21 21   "label" : "Type of book",
22 22   "aria-label" : "Select the type of book",
44 + "placeholder" : "Type",
23 23   "data-error-response-type" : "use_label_definite_1",
24 24   "data-set-space" : "true",
25 - "placeholder" : "Type",
26 - "space-reference" : "books",
47 + "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,24 +45,27 @@
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 -#set($publish_year = {
52 - "id" : "publish_year",
53 - "type" : "number",
68 +#set($author = {
69 + "id" : "author",
70 + "type" : "text",
54 54   "required" : "true",
55 - "label" : "Year of publishing",
56 - "aria-label" : "Enter the year of publishing",
57 - "placeholder" : "Year",
72 + "label" : "Author of the book",
73 + "aria-label" : "Enter the author of the book",
74 + "placeholder" : "Author",
58 58   "data-error-response-type" : "use_label_definite_1",
76 + "data-query-type" : "XWQL.matchObject",
77 + "data-query-scope" : "books",
78 + "data-query-list-type" : "suggest-select",
79 + "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_select_list')",
80 + "data-query-list-contents" : "value",
81 + "data-query-list-editable" : "true",
59 59   "data-create-xobj" : "true",
60 60   "data-xobj-classname" : "books.WebHome",
61 - "data-xobj-fieldname" : "publish_year"
84 + "data-xobj-fieldname" : "author",
85 + "help-block" : 'Select the author of this case.'
62 62  })
63 -
64 -#createFormElement($publish_year)
65 -
87 +#createFormElement($author)
66 66  #set($extra_info = {
67 67   "id" : "extra_info",
68 68   "type" : "checkbox",
... ... @@ -70,33 +70,28 @@
70 70   "label" : "Extra information (optional)",
71 71   "value" : "yes"
72 72  })
73 -
74 74  #createFormElement($extra_info)
75 -
76 76  #createExpandStart("extra_info" "yes")
77 -
78 -#set($author = {
79 - "id" : "author",
80 - "type" : "text",
97 +#set($publish_year = {
98 + "id" : "publish_year",
99 + "type" : "number",
81 81   "required" : "false",
82 - "label" : "Author",
83 - "aria-label" : "Enter the author name",
84 - "placeholder" : "$services.localization.render('cases.word.author.placeholder')",
85 - "data-query-type" : "XWQL.matchObject",
86 - "data-query-scope" : "books",
87 - "data-query-list-type" : "suggest-select",
88 - "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_select_list')",
89 - "data-query-list-contents" : "value",
101 + "label" : "Year of publishing",
102 + "aria-label" : "Enter the year of publishing",
103 + "placeholder" : "Year",
104 + "data-error-response-type" : "use_label_definite_1",
90 90   "data-create-xobj" : "true",
91 91   "data-xobj-classname" : "books.WebHome",
92 - "data-xobj-fieldname" : "author",
93 - "help-block" : 'Select the author of this case.'
107 + "data-xobj-fieldname" : "publish_year"
94 94  })
95 -
96 -#createFormElement($author)
97 -
109 +#createFormElement($publish_year)
98 98  #createExpandEnd()
99 -
111 +#set($submit = {
112 + "id" : "create_book",
113 + "button-text" : "Create book",
114 + "help-block" : ""
115 +})
116 +#createSubmit($submit)
100 100  #createFormEnd()
101 101  
102 102  {{/html}}
author
Use Suggest
... ... @@ -1,0 +1,1 @@
1 +1
publish_year
Number
... ... @@ -1,0 +1,1 @@
1 +2
Number Type
... ... @@ -1,0 +1,1 @@
1 +long
Size
... ... @@ -1,0 +1,1 @@
1 +30
Pretty Name
... ... @@ -1,0 +1,1 @@
1 +publish_year
Name
... ... @@ -1,0 +1,1 @@
1 +publish_year
remedy
Number
... ... @@ -1,1 +1,0 @@
1 -3
Size
... ... @@ -1,1 +1,0 @@
1 -30
Pretty Name
... ... @@ -1,1 +1,0 @@
1 -remedy
Name
... ... @@ -1,1 +1,0 @@
1 -remedy
title
Number
... ... @@ -1,1 +1,0 @@
1 -1
Size
... ... @@ -1,1 +1,0 @@
1 -30
Pretty Name
... ... @@ -1,1 +1,0 @@
1 -title
Name
... ... @@ -1,1 +1,0 @@
1 -title
Use Suggest
... ... @@ -1,1 +1,0 @@
1 -1
type
Number
... ... @@ -1,1 +1,0 @@
1 -2
Size
... ... @@ -1,1 +1,0 @@
1 -30
Pretty Name
... ... @@ -1,1 +1,0 @@
1 -type
Name
... ... @@ -1,1 +1,0 @@
1 -type
Use Suggest
... ... @@ -1,1 +1,0 @@
1 -1