Changes for page Books

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

From version 9.3
edited by Jip-jan Alunkel
on August 30, 21:55
Change comment: Renamed back-links.
To version 8.25
edited by Jip-jan Alunkel
on April 16, 21:40
Change comment: Updated class property

Summary

Details

Page properties
Content
... ... @@ -1,9 +1,10 @@
1 -{{include reference="assets.pagemaker.macros"/}}
1 +{{include reference="assets.formMaker.macros" /}}
2 2  
3 3  {{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}))
4 +#set($discard = $services.localization.use('document', 'cases.Code.translations'))
5 +#set($discard = $services.localization.use('document', 'assets.formMaker.translations'))
6 +#set($discard = $xwiki.ssx.use('assets.formMaker.WebHome'))
7 +#set($discard = $xwiki.jsx.use('assets.formMaker.WebHome', {'minify' : false}))
7 7  
8 8  {{html wiki="true" clean="false"}}
9 9  <p>
... ... @@ -10,7 +10,7 @@
10 10  All about books
11 11  </p>
12 12  <h2 class="livetable">Overview of all books</h2>
13 -<div class="livetable">
14 +<div id="livetable">
14 14  
15 15  #set ($columns = ["doc.title", "author", "doc.space"])
16 16  #set ($columnsProperties = {
... ... @@ -34,6 +34,7 @@
34 34  </p>
35 35  
36 36  #createFormStart("homeoworld_form" "book")
38 +
37 37  #set($booktype = {
38 38   "id" : "booktype",
39 39   "type" : "select",
... ... @@ -43,10 +43,12 @@
43 43   "placeholder" : "Type",
44 44   "data-error-response-type" : "use_label_definite_1",
45 45   "data-set-space" : "true",
46 - "select-space-reference" : "books",
48 + "space-reference" : "books",
47 47   "help-block" : "Choose the type of book you would like to add."
48 48  })
51 +
49 49  #createFormElement($booktype)
53 +
50 50  #set($book_title = {
51 51   "id" : "book_title",
52 52   "type" : "text",
... ... @@ -56,7 +56,7 @@
56 56   "placeholder" : "Title",
57 57   "data-error-response-type" : "use_label_definite_1",
58 58   "data-query-type" : "XWQL.matchTitle",
59 - "data-query-scope" : "books",
63 + "data-query-scope" : "books^materia-medica",
60 60   "data-query-list-type" : "suggest-negate",
61 61   "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_negate_list')",
62 62   "data-query-list-contents" : "value",
... ... @@ -63,7 +63,9 @@
63 63   "data-create-page" : "true",
64 64   "help-block" : 'When providing a title of a common type of book, please also provide the authorʼs last name, viz. Boericke Materia Medica.'
65 65  })
70 +
66 66  #createFormElement($book_title)
72 +
67 67  #set($author = {
68 68   "id" : "author",
69 69   "type" : "text",
... ... @@ -83,20 +83,13 @@
83 83   "data-xobj-fieldname" : "author",
84 84   "help-block" : 'Select the author of this case.'
85 85  })
92 +
86 86  #createFormElement($author)
87 -#set($extra_info = {
88 - "id" : "extra_info",
89 - "type" : "checkbox",
90 - "required" : "no",
91 - "label" : "Extra information (optional)",
92 - "value" : "yes"
93 -})
94 -#createFormElement($extra_info)
95 -#createExpandStart("extra_info" "yes")
94 +
96 96  #set($publish_year = {
97 97   "id" : "publish_year",
98 98   "type" : "number",
99 - "required" : "false",
98 + "required" : "true",
100 100   "label" : "Year of publishing",
101 101   "aria-label" : "Enter the year of publishing",
102 102   "placeholder" : "Year",
... ... @@ -105,8 +105,23 @@
105 105   "data-xobj-classname" : "books.WebHome",
106 106   "data-xobj-fieldname" : "publish_year"
107 107  })
107 +
108 108  #createFormElement($publish_year)
109 +
110 +#set($extra_info = {
111 + "id" : "extra_info",
112 + "type" : "checkbox",
113 + "required" : "no",
114 + "label" : "Extra information (optional)",
115 + "value" : "yes"
116 +})
117 +
118 +#createFormElement($extra_info)
119 +
120 +#createExpandStart("extra_info" "yes")
121 +
109 109  #createExpandEnd()
123 +
110 110  #set($submit = {
111 111   "id" : "create_book",
112 112   "button-text" : "Create book",
... ... @@ -113,6 +113,7 @@
113 113   "help-block" : ""
114 114  })
115 115  #createSubmit($submit)
130 +
116 116  #createFormEnd()
117 117  
118 118  {{/html}}