Cambios para el documento Espacios
Última modificación por Administrator el 2024/06/06 10:05
Desde la versión 2.1
editado por Administrator
el 2024/06/05 19:09
el 2024/06/05 19:09
Cambiar el comentario:
Migrated property [defaultCategories] from class [XWiki.WikiMacroClass]
Hasta la versión 4.1
editado por Administrator
el 2024/06/06 10:05
el 2024/06/06 10:05
Cambiar el comentario:
Install extension [org.xwiki.platform:xwiki-platform-index-ui/15.10.10]
Resumen
-
Propiedades de página (1 modificado, 0 añadido, 0 eliminado)
-
Objetos (1 modificado, 0 añadido, 0 eliminado)
Detalles
- Propiedades de página
-
- Título
-
... ... @@ -1,1 +1,1 @@ 1 -$services.localization.render(' xe.spaces')1 +$services.localization.render('index.spacesMacro.title')
- XWiki.WikiMacroClass[0]
-
- Código de la macro
-
... ... @@ -3,7 +3,7 @@ 3 3 ## List spaces within the wiki. 4 4 ## 5 5 $xwiki.ssx.use('Main.Spaces')## 6 -#set($spaceList = $xwi ki.getSpaces())6 +#set($spaceList = $services.query.xwql('select distinct doc.space from Document doc order by doc.space').addFilter('hidden').execute()) 7 7 {{html}} 8 8 <ul class="xlist"> 9 9 ## ... ... @@ -12,7 +12,7 @@ 12 12 #foreach($space in $spaceList) 13 13 ## Display space only if the user has view right on space home and if the space is not blacklisted. 14 14 ## $blacklistedSpaces is set in xwikivars.vm 15 - #set ($spaceHomeDocumentReference = $services.model. createDocumentReference($xcontext.database, $space, 'WebHome'))15 + #set ($spaceHomeDocumentReference = $services.model.resolveSpace($space)) 16 16 #if($xwiki.hasAccessLevel('view', $services.model.serialize($spaceHomeDocumentReference)) && !$blacklistedSpaces.contains($space)) 17 17 <li class="xitem xunderline xhighlight space"> 18 18 <div class="xitemcontainer"> ... ... @@ -19,14 +19,14 @@ 19 19 <div class="spSpaceName"><a href="$xwiki.getURL($spaceHomeDocumentReference)">${escapetool.xml($space)}</a></div> 20 20 <div class="xshowonhover spSpaceActions"> 21 21 ## Link to the space index. 22 - <a href="$xwiki.getURL('Main.SpaceIndex', 'view', "space=$escapetool.url($space)")" title="$services.localization.render(' xe.spaces.action.index')">23 - <img src="$xwiki.getSkinFile('icons/silk/book_open.png')" alt="$services.localization.render(' xe.spaces.action.index.alt')"/>22 + <a href="$xwiki.getURL('Main.SpaceIndex', 'view', "space=$escapetool.url($space)")" title="$services.localization.render('index.spacesMacro.spaceIndex.title')"> 23 + <img src="$xwiki.getSkinFile('icons/silk/book_open.png')" alt="$services.localization.render('index.spacesMacro.spaceIndex.alt')"/> 24 24 </a> 25 25 ## If the user has admin right on the space display links to administration and delete. 26 - #set ($spacePreferencesDocumentReference = $services.model.create DocumentReference($xcontext.database, $space, 'WebPreferences'))26 + #set ($spacePreferencesDocumentReference = $services.model.createEntityReference('WebPreferences', 'DOCUMENT', $spaceHomeDocumentReference)) 27 27 #if($xwiki.hasAccessLevel('admin', $services.model.serialize($spacePreferencesDocumentReference))) 28 - <a href="$xwiki.getURL($spacePreferencesDocumentReference, 'admin', '')" title="$services.localization.render(' xe.spaces.action.admin')">29 - <img src="$xwiki.getSkinFile('icons/silk/wrench.png')" alt="$services.localization.render(' xe.spaces.action.admin.alt')"/>28 + <a href="$xwiki.getURL($spacePreferencesDocumentReference, 'admin', '')" title="$services.localization.render('index.spacesMacro.spaceAdministration.title')"> 29 + <img src="$xwiki.getSkinFile('icons/silk/wrench.png')" alt="$services.localization.render('index.spacesMacro.spaceAdministration.alt')"/> 30 30 </a> 31 31 #end 32 32 </div> ... ... @@ -38,21 +38,22 @@ 38 38 ## 39 39 ## Space creation. 40 40 ## 41 - ## Only if the current user has admin rights and the current action is not inline. If it's inline, then there is already a form, and if we render the second, nested one, the DOM is messed up in IE. 42 - #if($xwiki.hasAdminRights() && "$!xcontext.action" != "inline" && "$!xcontext.action" != "edit") 41 + ## Only if the current user has the right to create spaces and the current action is not inline. 42 + ## If it's inline, then there is already a form, and if we render the second, nested one, the DOM is messed up in IE. 43 + #if($hasCreateSpace && "$!xcontext.action" != "inline" && "$!xcontext.action" != "edit") 43 43 <li id="spSpaceCreateItem" class="xitem space"> 44 44 <div class="xitemcontainer"> 45 - <div id="spSpaceCreateLabel" class="spSpaceName"><a href="$xwiki.getURL('XWiki.CreatePage', 'view', 'tocreate=space')" onclick="toggleClass($('spSpaceCreateForm'), 'hidden'); return false;">$services.localization.render(' xe.spaces.createspace')</a></div>46 + <div id="spSpaceCreateLabel" class="spSpaceName"><a href="$xwiki.getURL('XWiki.CreatePage', 'view', 'tocreate=space')" onclick="toggleClass($('spSpaceCreateForm'), 'hidden'); return false;">$services.localization.render('index.spacesMacro.createSpace.link')</a></div> 46 46 <div class="spacer"> </div> 47 47 <div id="spSpaceCreateForm" class="hidden"> 48 48 <form method="post" action="$doc.getURL('create')" class="xformInline"> 49 49 <div> 50 50 <input name="tocreate" type="hidden" value="space" /> 51 - #set($newSpaceName = $escapetool.xml($services.localization.render(' xe.spaces.createspace.defaultname')))52 + #set($newSpaceName = $escapetool.xml($services.localization.render('index.spacesMacro.createSpace.defaultSpaceName'))) 52 52 <label class="hidden" for="spSpaceCreateTextInput">$newSpaceName</label> 53 53 <input id="spSpaceCreateTextInput" type="text" name="space" value="$newSpaceName" class="panelinput withTip" /> 54 54 <span class="buttonwrapper"> 55 - <input type="submit" value="$services.localization.render(' xe.spaces.createspace.submit')" class="button" />56 + <input type="submit" value="$services.localization.render('index.spacesMacro.createSpace.submit')" class="button" /> 56 56 </span> 57 57 </div> 58 58 </form> - Categoría predeterminada
-
... ... @@ -1,1 +1,0 @@ 1 -Navigation - Cacheado
-
... ... @@ -1,0 +1,1 @@ 1 +No - Renderizado asíncrono
-
... ... @@ -1,0 +1,1 @@ 1 +No - Default categories
-
... ... @@ -1,0 +1,1 @@ 1 +Deprecated