Changes for page Books

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

From version 8.30
edited by Jip-jan Alunkel
on April 17, 23:28
Change comment: Updated class property
To version 8.16
edited by Jip-jan Alunkel
on April 10, 17:02
Change comment: Added class property

Summary

Details

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