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
Hide line numbers
1: {{velocity}} 2: ### Sheet used to generically display the XWikiPreferences object fields in the administration sheets. 3: #if ("$!section" != '') 4: ## clean="false" due to bug #XWIKI-4122 - the <legend> element is dropped. 5: {{html clean="false"}} 6: <form id="$section.toLowerCase()" method="post" action="$xwiki.getURL($currentDoc, 'saveandcontinue')" onsubmit="cancelCancelEdit()" class="xform half"> 7: #set($prefsClassName = 'XWiki.XWikiPreferences') 8: #set($obj = $doc.getObject($prefsClassName)) 9: #foreach ($item in $legend) 10: #set ($fields = $params.get($item)) 11: <fieldset class="$item"> 12: ## If there is only one section, don't display the legend 13: #if ($legend.size() > 1) 14: <legend>$msg.get("admin.${item}")</legend> 15: #end 16: #if ($fields.size() > 0) 17: <dl> 18: #end 19: #foreach($field in $fields) 20: #set($prop = $obj.xWikiClass.get($field)) 21: #set($title = $msg.get($field)) 22: #if ($title == $field && $prop) 23: #set ($title = $!prop.prettyName) 24: #end 25: <dt> 26: <label #if($prop)for="${prefsClassName}_${obj.number}_${prop.name}"#end class="$field">$title 27: #if($field == 'skin') 28: #set ($skin = $xwiki.skin) 29: <span class="buttonwrapper"><a href="$xwiki.getURL($skin)"#if ($skin.indexOf('.') < 0) class="hidden"#end>$msg.get('admin.customize')</a></span> 30: #end 31: #if($field == 'colorTheme') 32: #if ($editor == 'globaladmin') 33: #set ($colorThemeName = $xwiki.getXWikiPreference('colorTheme')) 34: #else 35: #set ($colorThemeName = $xwiki.getSpacePreference('colorTheme')) 36: #set ($wikiColorTheme = $xwiki.getDocument($xwiki.getXWikiPreference('colorTheme'))) 37: #if (!$wikiColorTheme.isNew()) 38: #set ($colorThemeHint = $msg.get('admin.colortheme.wikiSetting', ["<a href='$wikiColorTheme.getURL()'>$wikiColorTheme.plainTitle</a>"])) 39: #end 40: #end 41: #if($xwiki.exists('ColorThemes.WebHome')) 42: #set ($colorThemeHint = "$!{colorThemeHint} <strong><a href=""$xwiki.getURL('ColorThemes.WebHome')"">$msg.get('admin.colortheme.manage')</a></strong>") 43: #end 44: <span class="buttonwrapper"><a href="$xwiki.getURL($colorThemeName, 'inline')"#if ($colorThemeName.indexOf('.') < 0) class="hidden"#end>$msg.get('admin.customize')</a></span> 45: #end 46: </label> 47: </dt> 48: #if ($prop) 49: <dd>$doc.display($prop.name, 'edit', $obj).replaceAll('(^..html.*?}})|(../html..$)', '')</dd> 50: #if($field == 'colorTheme' && $colorThemeHint) 51: <dd class="xHint">$colorThemeHint</dd> 52: #end 53: #end 54: #end 55: #if ($fields.size() > 0) 56: </dl> 57: #end 58: </fieldset> 59: #end 60: <div class="hidden"> 61: <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" /> 62: <input type="hidden" name="xcontinue" value="$xwiki.getURL($currentDoc, 'admin', "editor=${escapetool.url(${editor})}&section=${escapetool.url(${section})}&space=${escapetool.url(${currentSpace})}")" /> 63: <input type="hidden" name="xredirect" value="$xwiki.getURL($currentDoc, 'admin', "editor=${escapetool.url(${editor})}&section=${escapetool.url(${section})}&space=${escapetool.url(${currentSpace})}")" /> 64: <input type="hidden" name="classname" value="$prefsClassName" /> 65: </div> 66: <div class="bottombuttons"> 67: <p class="admin-buttons"> 68: <span class="buttonwrapper"><input class="button" type="submit" name="formactionsac" value="$msg.get('admin.save')" /></span> 69: </p> 70: </div> ## bottombuttons 71: </form> 72: {{/html}} 73: #end 74: {{/velocity}}