Modifications pour le document Espaces
Modifié par superadmin le 2021/12/12 21:39
modifié par Paul Libbrecht (admin)
sur 2016/07/26 21:56
sur 2016/07/26 21:56
modifié par Administrator
sur 2013/06/04 10:06
sur 2013/06/04 10:06
Commentaire de modification :
Import
Résumé
Détails
- Propriétés de la Page
-
- Titre
-
... ... @@ -1,1 +1,1 @@ 1 -$services.localization.render(' index.spacesMacro.title')1 +$services.localization.render('xe.spaces') - Auteur du document
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. adminPolx1 +XWiki.Admin - Masqué
-
... ... @@ -1,1 +1,1 @@ 1 - true1 +false
- XWiki.WikiMacroClass[0]
-
- Code 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 = $ services.query.xwql('select distinct doc.spacefrom Documentdoc order by doc.space').addFilter('hidden').execute())6 +#set($spaceList = $xwiki.getSpaces()) 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.re solveSpace($space))15 + #set ($spaceHomeDocumentReference = $services.model.createDocumentReference($xcontext.database, $space, 'WebHome')) 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(' index.spacesMacro.spaceIndex.title')">23 - <img src="$xwiki.getSkinFile('icons/silk/book_open.png')" alt="$services.localization.render(' index.spacesMacro.spaceIndex.alt')"/>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')"/> 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 EntityReference('WebPreferences','DOCUMENT',$spaceHomeDocumentReference))26 + #set ($spacePreferencesDocumentReference = $services.model.createDocumentReference($xcontext.database, $space, 'WebPreferences')) 27 27 #if($xwiki.hasAccessLevel('admin', $services.model.serialize($spacePreferencesDocumentReference))) 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')"/>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')"/> 30 30 </a> 31 31 #end 32 32 </div> ... ... @@ -38,22 +38,21 @@ 38 38 ## 39 39 ## Space creation. 40 40 ## 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") 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() && "$!context.action" != "inline") 44 44 <li id="spSpaceCreateItem" class="xitem space"> 45 45 <div class="xitemcontainer"> 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>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> 47 47 <div class="spacer"> </div> 48 48 <div id="spSpaceCreateForm" class="hidden"> 49 49 <form method="post" action="$doc.getURL('create')" class="xformInline"> 50 50 <div> 51 51 <input name="tocreate" type="hidden" value="space" /> 52 - #set($newSpaceName = $escapetool.xml($services.localization.render(' index.spacesMacro.createSpace.defaultSpaceName')))51 + #set($newSpaceName = $escapetool.xml($services.localization.render('xe.spaces.createspace.defaultname'))) 53 53 <label class="hidden" for="spSpaceCreateTextInput">$newSpaceName</label> 54 54 <input id="spSpaceCreateTextInput" type="text" name="space" value="$newSpaceName" class="panelinput withTip" /> 55 55 <span class="buttonwrapper"> 56 - <input type="submit" value="$services.localization.render(' index.spacesMacro.createSpace.submit')" class="button" />55 + <input type="submit" value="$services.localization.render('xe.spaces.createspace.submit')" class="button" /> 57 57 </span> 58 58 </div> 59 59 </form>