Changes for page Books

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

From version 8.2
edited by Jip-jan Alunkel
on April 09, 19:44
Change comment: Added class property
To version 8.23
edited by Jip-jan Alunkel
on April 11, 23:53
Change comment: Updated class property

Summary

Details

Page properties
Content
... ... @@ -1,16 +1,37 @@
1 +{{include reference="assets.formMaker.macros" /}}
2 +
1 1  {{velocity}}
4 +{{html}}
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 -
9 +<p>
8 8  All about books
11 +</p>
12 +<h2 class="livetable">Overview of all books</h2>
13 +<div id="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 16  
... ... @@ -19,12 +19,12 @@
19 19   "type" : "select",
20 20   "required" : "true",
21 21   "label" : "Type of book",
22 - "aria-label" : "Select the locality",
23 - "data-error-response-type" : "use_label_defined_1",
43 + "aria-label" : "Select the type of book",
44 + "placeholder" : "Type",
45 + "data-error-response-type" : "use_label_definite_1",
24 24   "data-set-space" : "true",
25 - "placeholder" : "$services.localization.render('cases.word.locality_select.placeholder')",
26 26   "space-reference" : "books",
27 - "help-block" : "Choose the type of book you would like to enter."
48 + "help-block" : "Choose the type of book you would like to add."
28 28  })
29 29  
30 30  #createFormElement($booktype)
... ... @@ -33,41 +33,58 @@
33 33   "id" : "book_title",
34 34   "type" : "text",
35 35   "required" : "true",
36 - "label" : "Title",
57 + "label" : "Title of the book",
37 37   "aria-label" : "Enter the title of the book",
38 - "placeholder" : "$services.localization.render('cases.wordgroup.main_complaint.placeholder')",
59 + "placeholder" : "Title",
39 39   "data-error-response-type" : "use_label_definite_1",
40 40   "data-query-type" : "XWQL.matchTitle",
41 41   "data-query-scope" : "books",
42 42   "data-query-list-type" : "suggest-negate",
43 - "data-suggest-list-header" : "$services.localization.render('cases.line.suggest_negate_list')",
64 + "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_negate_list')",
44 44   "data-query-list-contents" : "value",
45 45   "data-create-page" : "true",
46 - "help-block" : 'Please be as concise as possible when you describe the main complaint. For example:<br />"chronic headache with bowel complaints,"<br />"intermittend fever" or<br />"diarrhea."'
67 + "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 48  
49 -#createFormElement($main_complaint)
70 +#createFormElement($book_title)
50 50  
51 -#set($remedy = {
52 - "id" : "remedy",
72 +#set($author = {
73 + "id" : "author",
53 53   "type" : "text",
54 54   "required" : "true",
55 - "label" : "Remedy",
56 - "aria-label" : "Choose the remedy",
57 - "placeholder" : "$services.localization.render('cases.word.remedy.placeholder')",
76 + "label" : "Author of the book",
77 + "aria-label" : "Enter the author of the book",
78 + "placeholder" : "Author",
58 58   "data-error-response-type" : "use_label_definite_1",
59 - "data-query-type" : "JSON.remedies",
80 + "data-query-type" : "XWQL.matchObject",
81 + "data-query-scope" : "books",
60 60   "data-query-list-type" : "suggest-select",
61 - "data-suggest-list-header" : "$services.localization.render('cases.line.suggest_select_list')",
62 - "data-query-list-contents" : "value/key",
83 + "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_select_list')",
84 + "data-query-list-contents" : "value",
85 + "data-query-list-editable" : "true",
63 63   "data-create-xobj" : "true",
64 64   "data-xobj-classname" : "books.WebHome",
65 - "data-xobj-fieldname" : "remedy",
66 - "help-block" : 'Select the remedy that is central in this case.'
88 + "data-xobj-fieldname" : "author",
89 + "help-block" : 'Select the author of this case.'
67 67  })
68 68  
69 -#createFormElement($remedy)
92 +#createFormElement($author)
70 70  
94 +#set($publish_year = {
95 + "id" : "publish_year",
96 + "type" : "number",
97 + "required" : "true",
98 + "label" : "Year of publishing",
99 + "aria-label" : "Enter the year of publishing",
100 + "placeholder" : "Year",
101 + "data-error-response-type" : "use_label_definite_1",
102 + "data-create-xobj" : "true",
103 + "data-xobj-classname" : "books.WebHome",
104 + "data-xobj-fieldname" : "publish_year"
105 +})
106 +
107 +#createFormElement($publish_year)
108 +
71 71  #set($extra_info = {
72 72   "id" : "extra_info",
73 73   "type" : "checkbox",
... ... @@ -80,28 +80,15 @@
80 80  
81 81  #createExpandStart("extra_info" "yes")
82 82  
83 -#set($author = {
84 - "id" : "author",
85 - "type" : "text",
86 - "required" : "false",
87 - "label" : "Author",
88 - "aria-label" : "Enter the author name",
89 - "placeholder" : "$services.localization.render('cases.word.author.placeholder')",
90 - "data-query-type" : "XWQL.matchObject",
91 - "data-query-scope" : "books",
92 - "data-query-list-type" : "suggest-select",
93 - "data-suggest-list-header" : "$services.localization.render('cases.line.suggest_select_list')",
94 - "data-query-list-contents" : "value",
95 - "data-create-xobj" : "true",
96 - "data-xobj-classname" : "books.WebHome",
97 - "data-xobj-fieldname" : "author",
98 - "help-block" : 'Select the author of this case.'
99 -})
100 -
101 -#createFormElement($author)
102 -
103 103  #createExpandEnd()
104 104  
123 +#set($submit = {
124 + "id" : "create_book",
125 + "button-text" : "Create book",
126 + "help-block" : ""
127 +})
128 +#createSubmit($submit)
129 +
105 105  #createFormEnd()
106 106  
107 107  {{/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