Wiki source code of Data types

Last modified by Thomas Mortagne on 2020/01/28

Show last authors
1 {{template name="locationPicker_macros.vm" /}}
2
3 {{velocity output="false"}}
4 #if ($request.space && $request.name)
5 #set ($className = "#toXMLName($stringtool.removeEnd($request.name, 'Class'))")
6 #set ($classTitle = $stringtool.removeEnd($request.title, 'Class'))
7 #if ("$!classTitle" == '')
8 #set ($classTitle = $className)
9 #end
10 #set ($classTitle = "$classTitle Class")
11 #set ($classSpaceReference = $services.model.resolveSpace($request.space))
12 #set ($classReference = $services.model.createEntityReference("${className}Class", 'DOCUMENT', $classSpaceReference))
13 #if ($services.security.authorization.hasAccess('edit', $classReference))
14 $response.sendRedirect($xwiki.getURL($classReference, 'edit', $escapetool.url({
15 'editor': 'wiki',
16 'template': $request.template,
17 'parent': $request.parent,
18 'title': $classTitle
19 })))
20 ## Stop processing, since we already sent a redirect.
21 #stop
22 #end
23 #end
24 {{/velocity}}
25
26 {{velocity}}
27 $services.localization.render('platform.xclass.classes.description', [
28 '[[',
29 '>>http://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/]]'
30 ])
31
32 (% id="HClassTemplates" %)
33 = {{translation key="platform.xclass.classes.templates.heading"/}} =
34
35 {{translation key="platform.xclass.classes.templates.description"/}}
36
37 * [[$services.localization.render('platform.xclass.classes.templates.classSheet')>>ClassSheet]]
38 * [[$services.localization.render('platform.xclass.classes.templates.classTemplate')>>ClassTemplate]]
39 * [[$services.localization.render('platform.xclass.classes.templates.objectSheet')>>ObjectSheet]]
40
41 (% id="HCreateClass" %)
42 = {{translation key="platform.xclass.classes.createClass.heading"/}} =
43
44 $services.localization.render('platform.xclass.classes.createClass.description', ['//', '//'])
45
46 #if ("$!classReference" != '')
47 {{warning}}{{translation key="platform.xclass.classes.createClass.denied"/}}{{/warning}}
48
49 #end
50 {{html}}
51 <form action="$doc.URL" method="post" class="xform half">
52 <div class="hidden">
53 <input type="hidden" name="parent" value="XWiki.XWikiClasses"/>
54 <input type="hidden" name="template" value="XWiki.ClassTemplate"/>
55 </div>
56 #locationPicker({
57 'id': 'target',
58 'title': {
59 'label': 'core.create.title',
60 'hint': 'platform.xclass.classes.createClass.title.hint',
61 'name': 'title',
62 'placeholder': 'platform.xclass.classes.createClass.title.placeholder'
63 },
64 'preview': {
65 'label': 'core.create.locationPreview.label',
66 'hint': 'platform.xclass.classes.createClass.location.hint'
67 },
68 'parent': {
69 'label': 'core.create.spaceReference.label',
70 'hint': 'platform.xclass.classes.createClass.parent.hint',
71 'name': 'space',
72 'reference': $doc.documentReference.parent,
73 'placeholder': 'platform.xclass.classes.createClass.parent.placeholder'
74 },
75 'name': {
76 'label': 'core.create.name.label',
77 'hint': 'platform.xclass.classes.createClass.name.hint',
78 'name': 'name',
79 'placeholder': 'platform.xclass.classes.createClass.title.placeholder'
80 }
81 })
82 <p>
83 <span class="buttonwrapper">
84 <input type="submit" class="button" value="$escapetool.xml(
85 $services.localization.render('platform.xclass.classes.createClass.label'))"/>
86 </span>
87 </p>
88 </form>
89 {{/html}}
90 {{/velocity}}
91
92 (% id="HClassesLiveTable" %)
93 = {{translation key="platform.xclass.classes.livetable.heading"/}} =
94
95 {{velocity}}
96 {{html}}
97 #set ($columns = ['doc.title', 'doc.location', 'doc.date', 'doc.author', 'pageCount', '_actions'])
98 #set ($columnsProperties = {
99 'doc.title': {'link': 'view'},
100 'doc.location': {'html': true},
101 'doc.author': {'link': 'author'},
102 'pageCount': {'type': 'numeric', 'filterable': false, 'sortable': false},
103 '_actions': {'sortable': false, 'filterable': false, 'html': true, 'actions': ['edit', 'delete']}
104 })
105 #set ($options = {
106 'resultPage': 'XWiki.XWikiClassesLiveTableResults',
107 'translationPrefix' : 'platform.xclass.classes.livetable.',
108 'rowCount': 10,
109 'outputOnlyHtml': true,
110 'queryFilters': []
111 })
112 #livetable("classes" $columns $columnsProperties $options)
113 {{/html}}
114 {{/velocity}}

Get Connected