Изменения документа Настраиваемые разделы
Редактировал(а) Alexey Semenihin 23.10.2026, 15:12
От версии 2.1
отредактировано Dmitriy Rybakov
на 04.10.2024, 00:09
на 04.10.2024, 00:09
Изменить комментарий:
Install extension [org.xwiki.platform:xwiki-platform-administration-ui/15.10.12]
К версии 1.1
отредактировано Admin xWiKi
на 15.10.2019, 13:19
на 15.10.2019, 13:19
Изменить комментарий:
Install extension [org.xwiki.platform:xwiki-platform-administration-ui/11.8.1]
Сводка
-
Свойства страницы (3 изменено, 0 добавлено, 0 удалено)
-
Свойства класса (11 изменено, 1 добавлено, 1 удалено)
Подробности
- Свойства страницы
-
- Автор документа
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. rybakovds1 +XWiki.admin - Синтаксис
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki 2. 11 +XWiki 2.0 - Содержимое
-
... ... @@ -50,6 +50,10 @@ 50 50 #end 51 51 #set($currentSpace = $xwiki.getDocument($currentDoc).getSpace()) 52 52 ## 53 +## This application should not run with programming rights because it evaluates code which may not be trustworthy. 54 +## Removing the next line will open a security hole. 55 +$doc.dropPermissions()## 56 +## 53 53 ##------------------------------------------------------------------------------------------------------------ 54 54 ## If $section exists then we are viewing the admin page for a particular section. 55 55 ## eg: 'Registration', 'Presentation', 'Import' etc. ... ... @@ -123,10 +123,7 @@ 123 123 {{warning}}{{translation key="xe.admin.configurable.cannotLockNoJavascript"/}}{{/warning}} 124 124 125 125 </noscript> 126 - {{/html}} 127 - 128 - {{html clean=false}} 129 - <script> 130 + <script type="text/javascript"> 130 130 document.observe("xwiki:dom:loaded", function() { 131 131 XWiki.DocumentLock && new XWiki.DocumentLock('$escapetool.javascript($app.prefixedFullName)').lock(); 132 132 }); ... ... @@ -142,7 +142,10 @@ 142 142 #set($configurableObjs = []) 143 143 #foreach($configurableObj in $allConfigurableObjs) 144 144 #if($app.getValue('displayInSection', $configurableObj) == $section) 145 - #set($discard = $configurableObjs.add($configurableObj)) 146 + ## If this is space admin, then don't display global, if global don't display space. 147 + #if($globaladmin == ($app.getValue('configureGlobally', $configurableObj) == 1)) 148 + #set($discard = $configurableObjs.add($configurableObj)) 149 + #end 146 146 #end 147 147 #end 148 148 #if($configurableObjs.size() == 0) ... ... @@ -149,8 +149,7 @@ 149 149 ## Internal error, not translated. 150 150 #showHeading($appName, $headingShowing) 151 151 152 - {{error}}Internal error: All objects were filtered out for application: 153 - $services.rendering.escape($appName, 'xwiki/2.1').{{/error}} 156 + {{error}}Internal error: All objects were filtered out for application: $appName.{{/error}} 154 154 155 155 #else 156 156 #set($formAction = $xwiki.getURL($app.getFullName(), 'save')) ... ... @@ -157,23 +157,16 @@ 157 157 #set($formId = "${section.toLowerCase()}_${app.getFullName()}") 158 158 #set($escapedAppName = $escapetool.xml($app.getFullName())) 159 159 #foreach($configurableObj in $configurableObjs) 160 - #set ($heading = $app.getValue('heading', $configurableObj)) 161 - #set ($codeToExecute = "$!app.getValue('codeToExecute', $configurableObj)") 162 - ## If linkPrefix is set, then we will make each property label a link which starts with that prefix. 163 - #set ($linkPrefix = "$!app.getValue('linkPrefix', $configurableObj)") 164 - #if (!$app.restricted) 165 - #set ($evaluatedConfigurableObj = $configurableObj.evaluate()) 166 - #set ($heading = $evaluatedConfigurableObj.heading) 167 - #set ($linkPrefix = $evaluatedConfigurableObj.linkPrefix) 168 - #end 169 169 ## Display the header if one exists. 164 + #set($heading = $app.getValue('heading', $configurableObj)) 170 170 #if($heading && $heading != '') 171 - == $services.rendering.escape($heading, 'xwiki/2.1') ==166 + == #evaluate($heading) == 172 172 #end 173 - ## Display code to execute 174 - #if ($codeToExecute != '') 168 + ## 169 + #set($codeToExecute = "$!app.getValue('codeToExecute', $configurableObj)") 170 + #if($codeToExecute != '') 175 175 (%class="codeToExecute"%)(((## 176 - $configurableObj.display('codeToExecute', 'view', false)172 + #evaluate($codeToExecute)## 177 177 ))) 178 178 #end 179 179 ## ... ... @@ -183,6 +183,9 @@ 183 183 #set($propertiesToShow = []) 184 184 #end 185 185 ## 182 + ## If linkPrefix is set, then we will make each property label a link which starts with that prefix. 183 + #set($linkPrefix = "$!app.getValue('linkPrefix', $configurableObj)") 184 + ## 186 186 ## If the Configurable object specifies a configuration class, use it, 187 187 ## otherwise assume custom forms are used instead. 188 188 #set($configClassName = "$!app.getValue('configurationClass', $configurableObj)") ... ... @@ -201,12 +201,7 @@ 201 201 #showHeading($appName, $headingShowing) 202 202 203 203 {{error}} 204 - #set($escapedObjClassName = 205 - $services.rendering.escape($escapetool.java($objClass.getName()), 'xwiki/2.1')) 206 - #set($translationEscapedAppName = 207 - $services.rendering.escape($escapetool.java($app.getFullName()), 'xwiki/2.1')) 208 - {{translation key="xe.admin.configurable.noObjectOfConfigurationClassFound" 209 - parameters="~"$escapedObjClassName~", ~"$translationEscapedAppName~""/}} 203 + {{translation key="xe.admin.configurable.noObjectOfConfigurationClassFound" parameters="$objClass.getName(), $app.getFullName()"/}} 210 210 {{/error}} 211 211 212 212 #else ... ... @@ -272,7 +272,7 @@ 272 272 #end## Foreach document name in names to configure 273 273 274 274 {{html}} 275 - <script> 269 + <script type="text/javascript"> 276 276 /* <![CDATA[ */ 277 277 ## Alt+Shift+S presses the first saveAndContinue button it finds, not what we want so we will disable edit shortcuts. 278 278 document.observe('xwiki:dom:loaded', function() { ... ... @@ -282,7 +282,7 @@ 282 282 </script> 283 283 {{/html}}## 284 284 ## 285 -#else if ($currentDoc != 'XWiki.ConfigurableClass')279 +#else 286 286 ## 287 287 ##------------------------------------------------------------------------------------------------------------ 288 288 ## If section is not set then we are viewing the main administration page. ... ... @@ -357,7 +357,7 @@ 357 357 #if($globaladmin) 358 358 #set($queryString = "editor=globaladmin&section=") 359 359 #else 360 - #set($queryString = "space=$ escapetool.url($currentSpace)&section=")354 + #set($queryString = "space=${currentSpace}&section=") 361 361 #if($request.getParameter('editor')) 362 362 #set($queryString = "editor=$escapetool.url($request.getParameter('editor'))&$queryString") 363 363 #end ... ... @@ -399,9 +399,9 @@ 399 399 400 400 ## Finally we display an error message if there are any applications which we were unable to view. 401 401 #if($appsUserCannotView.size() > 0) 402 - {{error}}$services.localization.render('xe.admin.configurable.noViewAccessSomeApplications', 403 - 'xwiki/2.1', [$appsUserCannotView]){{/error}} 404 404 397 + {{error}}$services.localization.render('xe.admin.configurable.noViewAccessSomeApplications', [$appsUserCannotView]){{/error}} 398 + 405 405 #end 406 406 #end## If we should be looking at the main administration page. 407 407 {{/velocity}}
- categoryIcon
-
- codeToExecute
-
- Редактор
-
... ... @@ -1,1 +1,1 @@ 1 - ---1 +Text
- configurationClass
-
- Allow large strings
-
... ... @@ -1,1 +1,0 @@ 1 -0
- configureGlobally
-
- Name
-
... ... @@ -1,0 +1,1 @@ 1 +configureGlobally - Pretty Name
-
... ... @@ -1,0 +1,1 @@ 1 +configureGlobally - Display Form Type
-
... ... @@ -1,0 +1,1 @@ 1 +checkbox - Number
-
... ... @@ -1,0 +1,1 @@ 1 +4
- displayBeforeCategory
-
- displayInCategory
-
- displayInSection
-
- heading
-
- iconAttachment
-
- linkPrefix
-
- propertiesToShow
-
- Allow large strings
-
... ... @@ -1,1 +1,0 @@ 1 -0
- sectionOrder
-
- scope
-
- Name
-
... ... @@ -1,1 +1,0 @@ 1 -scope - Pretty Name
-
... ... @@ -1,1 +1,0 @@ 1 -scope - Relational Storage
-
... ... @@ -1,1 +1,0 @@ 1 -0 - Display Type
-
... ... @@ -1,1 +1,0 @@ 1 -select - Multiple Select
-
... ... @@ -1,1 +1,0 @@ 1 -0 - Size
-
... ... @@ -1,1 +1,0 @@ 1 -1 - Join separator (for display)
-
... ... @@ -1,1 +1,0 @@ 1 - - Cache
-
... ... @@ -1,1 +1,0 @@ 1 -0 - Multiselect separators (for editing)
-
... ... @@ -1,1 +1,0 @@ 1 -|, - Allow large strings
-
... ... @@ -1,1 +1,0 @@ 1 -0 - Number
-
... ... @@ -1,1 +1,0 @@ 1 -12 - Use Suggest
-
... ... @@ -1,1 +1,0 @@ 1 -1 - Values
-
... ... @@ -1,1 +1,0 @@ 1 -WIKI|SPACE|ALL_SPACES|WIKI+ALL_SPACES