Version 1.1 von admin am 2025/02/23 10:22

Zeige letzte Bearbeiter
1 {{velocity}}
2 #if ($type == 'edit')
3 #set ($className = $object.getxWikiClass().name)
4 #if ($doc.fullName == $className)
5 ## We are editing the class so the title must be read from / written to the template document.
6 #set ($name = 'templateTitle')
7 #set ($value = $xwiki.getDocument("$stringtool.removeEnd($className, 'Class')Template").title)
8 #else
9 ## We are editing an application entry so the title must be read from / written to the current document.
10 #set ($name = 'title')
11 #set ($value = $tdoc.title)
12 #if ("$!value" == '')
13 #set ($value = $tdoc.documentReference.name)
14 #end
15 #end
16 {{html clean="false"}}
17 <input type="text" name="$name" value="$!escapetool.xml($value)"
18 ## The default value for an AppWithinMinutes field should be optional so we make only the actual page title
19 ## mandatory and not the template title, which holds the default title value.
20 #if ($name == 'title' && $xwiki.getSpacePreference('xwiki.title.mandatory') == 1)required #end
21 data-validation-value-missing="$escapetool.xml($services.localization.render('core.validation.required.message'))"/>
22 {{/html}}
23 #elseif ("$!type" != '')
24 ## Render the title of the current document.
25 {{html}}$tdoc.getRenderedTitle('xhtml/1.0'){{/html}}
26 #else
27 The display mode is not specified!
28 #end
29 {{/velocity}}