General Actions:
Log-in
Register
Wiki:
games
▼
:
Document Index
»
Space:
XWiki
▼
:
Document Index
»
Page:
AdminFieldsDisplaySheet
Search
en
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Wiki Home
»
XWiki Space
»
XWiki Preferences
»
AdminSheet
»
AdminFieldsDisplaySheet
Wiki source code of
AdminFieldsDisplaySheet
Last modified by
Administrator
on 2011/11/06 20:09
Content
·
Comments
(0)
·
Annotations
(0)
·
Attachments
(0)
·
History
·
Information
Show line numbers
{{velocity}} ### Sheet used to generically display the XWikiPreferences object fields in the administration sheets. #if ("$!section" != '') ## clean="false" due to bug #XWIKI-4122 - the <legend> element is dropped. {{html clean="false"}} <form id="$section.toLowerCase()" method="post" action="$xwiki.getURL($currentDoc, 'saveandcontinue')" onsubmit="cancelCancelEdit()" class="xform half"> #set($prefsClassName = 'XWiki.XWikiPreferences') #set($obj = $doc.getObject($prefsClassName)) #foreach ($item in $legend) #set ($fields = $params.get($item)) <fieldset class="$item"> ## If there is only one section, don't display the legend #if ($legend.size() > 1) <legend>$msg.get("admin.${item}")</legend> #end #if ($fields.size() > 0) <dl> #end #foreach($field in $fields) #set($prop = $obj.xWikiClass.get($field)) #set($title = $msg.get($field)) #if ($title == $field && $prop) #set ($title = $!prop.prettyName) #end <dt> <label #if($prop)for="${prefsClassName}_${obj.number}_${prop.name}"#end class="$field">$title #if($field == 'skin') #set ($skin = $xwiki.skin) <span class="buttonwrapper"><a href="$xwiki.getURL($skin)"#if ($skin.indexOf('.') < 0) class="hidden"#end>$msg.get('admin.customize')</a></span> #end #if($field == 'colorTheme') #if ($editor == 'globaladmin') #set ($colorThemeName = $xwiki.getXWikiPreference('colorTheme')) #else #set ($colorThemeName = $xwiki.getSpacePreference('colorTheme')) #set ($wikiColorTheme = $xwiki.getDocument($xwiki.getXWikiPreference('colorTheme'))) #if (!$wikiColorTheme.isNew()) #set ($colorThemeHint = $msg.get('admin.colortheme.wikiSetting', ["<a href='$wikiColorTheme.getURL()'>$wikiColorTheme.plainTitle</a>"])) #end #end #if($xwiki.exists('ColorThemes.WebHome')) #set ($colorThemeHint = "$!{colorThemeHint} <strong><a href=""$xwiki.getURL('ColorThemes.WebHome')"">$msg.get('admin.colortheme.manage')</a></strong>") #end <span class="buttonwrapper"><a href="$xwiki.getURL($colorThemeName, 'inline')"#if ($colorThemeName.indexOf('.') < 0) class="hidden"#end>$msg.get('admin.customize')</a></span> #end </label> </dt> #if ($prop) <dd>$doc.display($prop.name, 'edit', $obj).replaceAll('(^..html.*?}})|(../html..$)', '')</dd> #if($field == 'colorTheme' && $colorThemeHint) <dd class="xHint">$colorThemeHint</dd> #end #end #end #if ($fields.size() > 0) </dl> #end </fieldset> #end <div class="hidden"> <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" /> <input type="hidden" name="xcontinue" value="$xwiki.getURL($currentDoc, 'admin', "editor=${escapetool.url(${editor})}&section=${escapetool.url(${section})}&space=${escapetool.url(${currentSpace})}")" /> <input type="hidden" name="xredirect" value="$xwiki.getURL($currentDoc, 'admin', "editor=${escapetool.url(${editor})}&section=${escapetool.url(${section})}&space=${escapetool.url(${currentSpace})}")" /> <input type="hidden" name="classname" value="$prefsClassName" /> </div> <div class="bottombuttons"> <p class="admin-buttons"> <span class="buttonwrapper"><input class="button" type="submit" name="formactionsac" value="$msg.get('admin.save')" /></span> </p> </div> ## bottombuttons </form> {{/html}} #end {{/velocity}}