Created
May 9, 2011 00:01
-
-
Save charlie/961824 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{velocity wiki="true"}} | |
## | |
## XWiki Dashboard | |
## | |
## This dashboard can be used for both wikis (Main.WebHome) | |
## and spaces (*.WebHome). | |
## | |
$xwiki.ssx.use('Main.Dashboard')## | |
#set ($isSpaceDashboard = false) | |
#if ($doc.space != "Main") | |
#set ($isSpaceDashboard = true) | |
#end | |
(% class="dashboard" %) | |
((( | |
(% class="dashboardleft" %) | |
((( | |
## | |
## Left column. | |
## | |
(% class="dashboardleftcontent" %) | |
((( | |
#if (!$isSpaceDashboard) | |
## | |
## Wiki spaces and tags | |
## | |
= $msg.get("xe.dashboard.wiki.spaces") = | |
{{spaces /}} | |
= $msg.get("xe.dashboard.wiki.tagcloud") = | |
{{tagcloud /}} | |
#else | |
## | |
## Space documents and tags | |
## | |
= $msg.get("xe.dashboard.space.documents", [$doc.space]) = | |
#set($limit = 100)## Maximum number of documents we display in the space dashboard list | |
#set($docNames = $xwiki.searchDocuments("where doc.space='${doc.space}' order by doc.creationDate desc", $limit, 0)) | |
{{html}} | |
#displayDocumentList($docNames false []) | |
## Note: we pass an empty blacklistedSpaces list since we are used as a space dashboard, not a global dashboard | |
{{/html}} | |
#if($docNames.size() == $limit) | |
#set($docCount = $xwiki.countDocuments("where doc.space='${doc.space}'")) | |
#set($remaining = $mathtool.sub($docCount, $limit)) | |
#if($remaining > 0) | |
(% class="documentListMore" %) ((( | |
// $msg.get('xe.dashboard.space.remainingDocumentsInSpace', [$remaining, $doc.space]) | |
[[$msg.get('xe.dashboard.space.visitSpaceIndex')>>Main.SpaceIndex?space=$doc.space]] // | |
))) | |
#end | |
#end | |
= $msg.get("xe.dashboard.wiki.tagcloud") = | |
#set ($tagCloudSpace = $doc.space) | |
{{tagcloud space="$tagCloudSpace" /}} | |
#end | |
))) | |
))) | |
(% class="dashboardright" %) | |
((( | |
## | |
## Right column | |
## | |
(% class="dashboardrightcontent" %) | |
((( | |
## | |
## Recent activity | |
## | |
## reset the two variables to make sure that whatever was on the context, the correct values are sent on both the cases possible here | |
#set($rcSpace = $util.null) | |
#set($rcChangesNb = $util.null) | |
#if (!$isSpaceDashboard) | |
= $msg.get("xe.dashboard.wiki.activity") = | |
#else | |
= $msg.get("xe.dashboard.space.activity", [$doc.space]) = | |
## Set variables to limit recent activity to the current space and 15 items. | |
#set ($aSpace = $doc.space) | |
#end | |
{{activity spaces="$!aSpace" /}} | |
))) | |
))) | |
(% class="dashboardspacer" %) | |
(((~ ))) | |
))) | |
{{/velocity}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment