一般动作
登录
Wiki: BROPEN ▼: Document Index
»
Space: Dashboard ▼: Document Index
»
Page: XWikiUserDashboardSheet
搜索
default
页面动作
导出 ▼: 以PDF格式导出 以RTF格式导出 以HTML格式导出
更多动作 ▼: 打印预览 察看源码
XWikiUsers » XWikiUserSheet的资料 » XWikiUserDashboardSheet

# Wiki源代码XWikiUserDashboardSheet

在2013-10-01 11:53上被Administrator修改
评论 (0) · 附件 (0) · 记录 · 信息
显示行号 {{velocity}} #set($userObj = $doc.getObject("XWiki.XWikiUsers")) #if(!$userObj) {{info}}$services.localization.render('xe.admin.users.applyonusers'){{/info}} #else #set($dashboardPrefs = $doc.getObject("Dashboard.UserDashboardPreferencesClass")) #if(!$dashboardPrefs) ## create the object and then display #set($dashboardPrefs = $doc.newObject("Dashboard.UserDashboardPreferencesClass")) ## get the default value of the property that we're interested in #set($dbPrefsClass = $dashboardPrefs.xWikiClass) #set($displayOnMainPageProp = $dbPrefsClass.get('displayOnMainPage')) #set($defaultValue = $displayOnMainPageProp.getProperty('defaultValue').value) ## this default value is of type long, for some reason, so I'll have to compare here instead of just set #if ($defaultValue > 0) #set($ok = $dashboardPrefs.set('displayOnMainPage', 1)) #else #set($ok = $dashboardPrefs.set('displayOnMainPage', 0)) #end #set($ok = $doc.save()) #end {{html clean="false" wiki="true"}} <div class="full column xform"> <div class="userDashboard"> #if($xcontext.action == 'view' && $hasEdit) <div class="editProfileCategory"><a href="$doc.getURL('inline', 'category=dashboard')"><span class="hidden">$services.localization.render('platform.core.profile.category.dashboard.edit')</span></a></div> #end <h1>$services.localization.render('platform.dashboard.user.preferences')</h1> <dl> <dt class="label"><label>$services.localization.render('platform.dashboard.user.displayOnMainPage')</label></dt> <dd>$doc.display('displayOnMainPage', $dashboardPrefs)</dd> </dl> </div> </div> {{/html}} #if ("$!{request.xpage}" != 'edituser') {{dashboard/}} #end #end {{/velocity}}

# 快速链接

- 首页
- 新闻动态
- FAQ

Copyright © 2013 北京博瑞开源软件有限公司
京ICP备12048974号