Changes for page Space Index
Last modified by Simon Urli on 2023/05/25 15:14
<
>
edited by Marius Dumitru Florea
on 2013/03/22 14:56
on 2013/03/22 14:56
edited by Vincent Massol
on 2013/10/15 14:51
on 2013/10/15 14:51
Change comment:
Import
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -$ msg.get("platform.index.spaceIndex")1 +$services.localization.render('platform.index.spaceIndex') - Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. mflorea1 +xwiki:XWiki.VincentMassol - Content
-
... ... @@ -1,6 +1,7 @@ 1 1 {{velocity}} 2 2 #if("$!request.space" != "") #set($space=$request.space) #else #set($space = $doc.space) #end 3 -$ msg.get('platform.index.spaceIndexDescription', [$space])3 +$services.localization.render('platform.index.spaceIndexDescription', [$space]) 4 4 5 5 {{documents space="$space.replaceAll('["~]', '~$0')" id="spaceindex"/}} 6 6 {{/velocity}} 7 +
- XWiki.WikiMacroClass[0]
-
- Macro code
-
... ... @@ -13,7 +13,7 @@ 13 13 #if ("$!spaceMacroParam" != '') 14 14 #set ($spaceParam = $spaceMacroParam) 15 15 #end 16 - #set ($docNames = $ xwiki.searchDocuments('where doc.space=? order by doc.creationDate desc',$limit, 0,[${spaceParam}]))16 + #set ($docNames = $services.query.hql('where doc.space=? order by doc.creationDate desc').setLimit($limit).bindValues([${spaceParam}]).execute()) 17 17 {{html}} 18 18 #displayDocumentList($docNames false []) 19 19 ## Note: we pass an empty blacklistedSpaces list since we are used as a space dashboard, not a global dashboard ... ... @@ -20,12 +20,12 @@ 20 20 {{/html}} 21 21 22 22 #if ($docNames.size() == $limit) 23 - #set ($docCount = $ xwiki.countDocuments('where doc.space=?',[${spaceParam}]))23 + #set ($docCount = $services.query.xwql('where doc.space = :space').bindValue('space', $spaceParam).addFilter('unique').count()) 24 24 #set ($remaining = $mathtool.sub($docCount, $limit)) 25 25 #if ($remaining > 0) 26 26 (% class="documentListMore" %) ((( 27 - // $ msg.get('xe.dashboard.space.remainingDocumentsInSpace', [$remaining, $spaceParam])28 - [[$ msg.get('xe.dashboard.space.visitSpaceIndex')>>Main.SpaceIndex?space=${escapetool.url($spaceParam)}]] //27 + // $services.localization.render('xe.dashboard.space.remainingDocumentsInSpace', [$remaining, $spaceParam]) 28 + [[$services.localization.render('xe.dashboard.space.visitSpaceIndex')>>Main.SpaceIndex?space=${escapetool.url($spaceParam)}]] // 29 29 ))) 30 30 #end 31 31 #end ... ... @@ -36,7 +36,7 @@ 36 36 #if ($hasCreatePage) 37 37 {{html}} 38 38 <ul class="xlist"> 39 - <li class="page create"><a href="$doc.getURL('create')">$ msg.get('platform.index.spaceIndexDocumentListCreate')</a></li>39 + <li class="page create"><a href="$doc.getURL('create')">$services.localization.render('platform.index.spaceIndexDocumentListCreate')</a></li> 40 40 </ul> 41 41 {{/html}} 42 42 #end