Wiki source code of ImageStyle Sheet

Last modified by superadmin on 2025/05/22 17:45

Show last authors
1 {{velocity}}
2 ## You can modify this page to customize the presentation of your object.
3 ## At first you should keep the default presentation and just save the document.
4
5 ## We have to use wiki=true because $doc.display() can produce wiki syntax.
6 {{html wiki="true" clean="false"}}
7 ## Load the JavaScript code required to make the object properties editable in-place.
8 #set ($discard = $xwiki.jsfx.use('uicomponents/edit/editableProperty.js', {
9 'forceSkinAction': true,
10 'language': $xcontext.locale
11 }))
12 #set ($editing = $xcontext.action == 'edit')
13 ## The object to display.
14 #set ($xobject = $doc.getObject('Image.Style.Code.ImageStyleClass'))
15 ## The class that describes the object properties.
16 #set ($xclass = $xobject.xWikiClass)
17 ## Make sure the following display* method calls use the right object.
18 #set ($discard = $doc.use($xobject))
19 ## Using the xform vertical form layout.
20 <div class="xform">
21 <input name="xhidden" type="hidden" value="1" />
22 <dl>
23 #foreach ($property in $xclass.properties)
24 <dt #if (!$editing && $hasEdit)
25 class="editableProperty"
26 #set ($xobjectPropertyReference = $xobject.getPropertyReference($property.name))
27 data-property="$escapetool.xml($services.model.serialize($xobjectPropertyReference))"
28 data-property-type="object"#end>
29 ## This must match the id generated by the $doc.display() method below.
30 #set ($propertyId = "${xclass.name}_${xobject.number}_$property.name")
31 <label#if ($editing) for="$escapetool.xml($propertyId)"#end>
32 $escapetool.xml($property.translatedPrettyName)
33 </label>
34 ## Support for specifying a translation key as hint in the property definition.
35 <span class="xHint">$!escapetool.xml($services.localization.render($property.hint))</span>
36 </dt>
37 <dd>$doc.display($property.name)</dd>
38 #end
39 #if (!$xclass.properties || $xclass.properties.size() == 0)
40 ## Keep the empty definition term in order to have valid HTML.
41 <dt></dt>
42 <dd>$escapetool.xml($services.localization.render('xclass.defaultObjectSheet.noProperties'))</dd>
43 #end
44 </dl>
45 </div>
46 {{/html}}
47
48 #if (!$editing)
49 [[{{translation key='image.style.imageStyleSheet.backToAdministration.link' /}}>>XWiki.XWikiPreferences||class="btn btn-primary admin-link" queryString="editor=globaladmin&section=image.style"]]
50 #end
51 {{/velocity}}