From version 1.1 >
edited by Admin
on 2009/09/15 12:20
To version < 2.1 >
edited by Vincent Massol
on 2011/10/05 19:23
>
Change comment: Imported from XAR

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Admin
1 +xwiki:XWiki.VincentMassol
XWiki.WikiMacroClass[0]
Macro code
... ... @@ -1,0 +1,33 @@
1 +{{velocity}}
2 + ## TODO: add me a parameter to specify the style, list or livetable
3 + ## get the number of documents to display
4 + #set($limit = $context.macro.params.get('count'))
5 + #if ("$!limit" == "")
6 + ## 100 documents displayed by default if no value is specified
7 + #set($limit = 100)
8 + #end
9 + #set($limit = $util.parseInt($limit))
10 + ## get the space to display the documents for
11 + #set($spaceParam = $doc.space)
12 + #set($spaceMacroParam = $context.macro.params.get('space'))
13 + #if("$!spaceMacroParam" != "")
14 + #set($spaceParam = $spaceMacroParam)
15 + #end
16 + #set($docNames = $xwiki.searchDocuments("where doc.space='${spaceParam}' order by doc.creationDate desc", $limit, 0))
17 + {{html}}
18 + #displayDocumentList($docNames false [])
19 + ## Note: we pass an empty blacklistedSpaces list since we are used as a space dashboard, not a global dashboard
20 + {{/html}}
21 +
22 + #if($docNames.size() == $limit)
23 + #set($docCount = $xwiki.countDocuments("where doc.space='${spaceParam}'"))
24 + #set($remaining = $mathtool.sub($docCount, $limit))
25 + #if($remaining > 0)
26 + (% class="documentListMore" %) (((
27 + // $msg.get('xe.dashboard.space.remainingDocumentsInSpace', [$remaining, $spaceParam])
28 + [[$msg.get('xe.dashboard.space.visitSpaceIndex')>>Main.SpaceIndex?space=$spaceParam]] //
29 + )))
30 + #end
31 + #end
32 +{{/velocity}}
33 +
Macro content availability
... ... @@ -1,0 +1,1 @@
1 +No content
Default category
... ... @@ -1,0 +1,1 @@
1 +Navigation
Macro description
... ... @@ -1,0 +1,1 @@
1 +Lists the documents in a space.
Macro id
... ... @@ -1,0 +1,1 @@
1 +spaceindex
Macro name
... ... @@ -1,0 +1,1 @@
1 +Space Index
Supports inline mode
... ... @@ -1,0 +1,1 @@
1 +No
Macro visibility
... ... @@ -1,0 +1,1 @@
1 +Current Wiki
XWiki.WikiMacroParameterClass[0]
Parameter default value
... ... @@ -1,0 +1,1 @@
1 +100
Parameter description
... ... @@ -1,0 +1,1 @@
1 +The maximum number of documents to display. By default, up to 100 documents will be listed. If all documents should be displayed, pass 0.
Parameter mandatory
... ... @@ -1,0 +1,1 @@
1 +No
Parameter name
... ... @@ -1,0 +1,1 @@
1 +count
XWiki.WikiMacroParameterClass[1]
Parameter description
... ... @@ -1,0 +1,1 @@
1 +The space to display the list of documents for. If missing, the current space will be used.
Parameter mandatory
... ... @@ -1,0 +1,1 @@
1 +No
Parameter name
... ... @@ -1,0 +1,1 @@
1 +space

Get Connected