Modifications pour le document Liste des pages de l'espace
Modifié par Thomas Mortagne le 2023/04/25 09:57
Depuis la version 5.1
modifié par Vincent Massol
sur 2014/09/30 14:50
sur 2014/09/30 14:50
Commentaire de modification :
Install extension [org.xwiki.platform:xwiki-platform-index-ui-6.2]
À la version 4.1
modifié par Thomas Mortagne
sur 2014/05/07 15:27
sur 2014/05/07 15:27
Commentaire de modification :
Install extensoin [org.xwiki.platform:xwiki-platform-index-ui-5.4.4]
Résumé
-
Propriétés de la Page (1 modifications, 0 ajouts, 0 suppressions)
-
Objets (1 modifications, 0 ajouts, 1 suppressions)
Détails
- Propriétés de la Page
-
- Auteur du document
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. VincentMassol1 +xwiki:XWiki.ThomasMortagne
- XWiki.WikiMacroClass[0]
-
- Code de la macro
-
... ... @@ -1,6 +1,6 @@ 1 1 {{velocity}} 2 - ## TODO: add a parameter to specify the style, list or livetable 3 - ## Get the number of documents to display2 + ## TODO: add me a parameter to specify the style, list or livetable 3 + ## get the number of documents to display 4 4 #set ($limit = $xcontext.macro.params.get('count')) 5 5 #if ("$!limit" == '') 6 6 ## 100 documents displayed by default if no value is specified ... ... @@ -7,26 +7,13 @@ 7 7 #set ($limit = '100') 8 8 #end 9 9 #set ($limit = $mathtool.toInteger($limit)) 10 - ## Compute the XWQL portion related to sorting, based on the passed "sort" parameter 11 - ## Valid values are "creationDate", "modificationDate" and "docName" 12 - #set ($sort = $xcontext.macro.params.get('sort')) 13 - #if ("$sort" == 'docName') 14 - ## Sorting alphabetically 15 - #set ($sortQuery = 'doc.name asc') 16 - #elseif ("$sort" == 'modificationDate') 17 - ## Sorting by update date 18 - #set ($sortQuery = 'doc.contentUpdateDate desc') 19 - #else 20 - ## Sort by creation date by default 21 - #set ($sortQuery = 'doc.creationDate desc') 22 - #end 23 - ## Get the space to display the documents for 10 + ## get the space to display the documents for 24 24 #set ($spaceParam = $doc.space) 25 25 #set ($spaceMacroParam = $xcontext.macro.params.get('space')) 26 26 #if ("$!spaceMacroParam" != '') 27 27 #set ($spaceParam = $spaceMacroParam) 28 28 #end 29 - #set ($docNames = $services.query.hql( "where doc.space=? order by$sortQuery").addFilter('currentlanguage').addFilter('hidden').setLimit($limit).bindValues([${spaceParam}]).execute())16 + #set ($docNames = $services.query.hql('where doc.space=? order by doc.creationDate desc').addFilter('currentlanguage').addFilter('hidden').setLimit($limit).bindValues([${spaceParam}]).execute()) 30 30 {{html}} 31 31 #displayDocumentList($docNames false []) 32 32 ## Note: we pass an empty blacklistedSpaces list since we are used as a space dashboard, not a global dashboard - Description de la macro
-
... ... @@ -1,1 +1,1 @@ 1 -Lists documents in a space. 1 +Lists the documents in a space.
- XWiki.WikiMacroParameterClass[2]
-
- Valeur par défaut du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -creationDate - Description du paramètre
-
... ... @@ -1,5 +1,0 @@ 1 -Optional parameter to choose the sorting of the list of document. 2 -Value must be: 3 -- creationDate sort by creation date (default) 4 -- modificationDate sort by update date 5 -- or docName sort alphabetically - Paramètre obligatoire
-
... ... @@ -1,1 +1,0 @@ 1 -Non - Nom du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -sort