General Actions:
Log-in
Register
Wiki:
games
▼
:
Document Index
»
Space:
Main
▼
:
Document Index
»
Page:
WebHome
Search
en
es
fr
nl
zh_TW
it
uk
ro
zh
lv
ca
sv
de
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Wiki source code of
Wiki Home
Last modified by
Administrator
on 2011/11/06 20:09
Content
·
Comments
(0)
·
Annotations
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: {{velocity}} 2: #set($displayDashboard = true) 3: #if ($context.user != "XWiki.XWikiGuest") 4: ## get the preferences of the current user 5: #set($userDbPrefs = $xwiki.getDocument($context.user).getObject("XWiki.UserDashboardPreferencesClass")) 6: #if ($userDbPrefs) 7: ## if the object exists, use the object value 8: #set($prefValue = $userDbPrefs.getProperty('displayOnMainPage').value) 9: #else 10: ## if the object does not exist, use the default value of the property in the class 11: #set($userPrefClass = $xwiki.getClass("XWiki.UserDashboardPreferencesClass")) 12: #set($displayOnMainPageProp = $userPrefClass.get('displayOnMainPage')) 13: #set($prefValue = $displayOnMainPageProp.getProperty('defaultValue').value) 14: #end 15: #if ($prefValue && $prefValue > 0) 16: #set($dashboardObjects = $xwiki.getDocument($context.user).getObjects("XWiki.GadgetClass")) 17: #if ($dashboardObjects.size() > 0) 18: {{dashboard source = "$context.user" /}} 19: #set($displayDashboard = false) 20: #else 21: #set($editDashboardLabel = $msg.get('xe.dashboard.wiki.personal.empty.edit')) 22: #set($editDashboardUrl = $xwiki.getURL($context.user, 'inline', "category=dashboard")) 23: {{info}}{{html}}$msg.get('xe.dashboard.wiki.personal.empty', ["<a href='${editDashboardUrl}'>$editDashboardLabel</a>"]){{/html}}{{/info}} 24: #set($displayDashboard = true) 25: #end 26: #end 27: #end 28: 29: #if($displayDashboard) 30: {{dashboard/}} 31: #end 32: 33: {{/velocity}}