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

# Wiki源代码XWikiUserSheet的资料

在2013-10-09 15:03上被Administrator修改
评论 (0) · 附件 (1) · 记录 · 信息
显示行号 {{velocity}} ######################### ## CSS & Javascripts ######################### #set($discard = $xwiki.ssx.use("XWiki.XWikiUserSheet")) #set($discard = $xwiki.jsx.use("XWiki.XWikiUserSheet")) ######################### ## Setting categories ######################### #set($categories = []) #set($discard = $categories.add({'id':'profile', 'sheet':'XWiki.XWikiUserProfileSheet'})) #set($isMyProfile = ($services.model.resolveDocument($xcontext.user) == $doc.documentReference)) #if($isMyProfile || $hasAdmin) #set($discard = $categories.add({'id':'preferences', 'sheet':'XWiki.XWikiUserPreferencesSheet'})) #end ## TODO: add APIs to be able to display users watchlists to admins #if($isMyProfile && $hasWatch) #set($discard = $categories.add({'id':'watchlist', 'sheet':'XWiki.XWikiUserWatchListSheet'})) #end #if($isMyProfile) #set($discard = $categories.add({'id':'network', 'sheet':'XWiki.XWikiUserNetworkSheet'})) #end #set($userWorkspaceSheet = 'WorkspaceManager.UserWorkspaceSheet') #if($xcontext.isMainWiki() && $xwiki.exists($userWorkspaceSheet)) #set($discard = $categories.add({ 'id': 'workspaces', 'name': $services.localization.render('workspacemanager.profile.category.workspaces'), 'sheet': $userWorkspaceSheet })) #end #if($isMyProfile && $hasDashboard) #set($discard = $categories.add({'id':'dashboard', 'sheet':'Dashboard.XWikiUserDashboardSheet'})) #end ######################### ## Current category ######################### #set($currentCategory = "$!request.category") #if($currentCategory == "") #set($currentCategory = $listtool.get($categories, 0).get('id')) #end ######################### ## Creating vertical menu ######################### #set($userMenu = [{ 'id' : 'settings', 'cssClass' : 'user-menu-title', 'children' : $categories } ]) ## Setting automaticaly url & css fields of each category #foreach($category in $userMenu) #foreach($subcategory in $category.get('children')) #set($id = $subcategory.get('id')) #set($discard = $subcategory.put('url', "?category=${id}")) #set($discard = $subcategory.put('cssClass', "user-menu-$id category-tab")) #end #end ######################### ## Display the left menu ######################### (% id="user-menu-col" %) ((( ############ ## Avatar ############ (% id="avatar" %) ((( #if($request.xpage == 'edituser') {{html clean="false"}} #resizedUserAvatar($doc.fullName 170) {{/html}} #else {{attachmentSelector classname="XWiki.XWikiUsers" object="$obj.number" property="avatar" #if ($isMyProfile) savemode="direct" #end defaultValue="XWiki.XWikiUserSheet@noavatar.png" width="120" alternateText="$xwiki.getUserName($doc.fullName, false)" buttontext="$services.localization.render('platform.core.profile.changePhoto')" displayImage="true" filter="png,jpg,gif"/}} #end ))) ########## ## Menu ########## (% id="user-vertical-menu" %) ((( #verticalNavigation($userMenu, {'translationPrefix' : 'platform.core.profile.category.', 'crtItemId' : $currentCategory, 'cssClass' : 'profile-menu'}) ))) ))) ######################### ## Display the page content ######################### (% id="user-page-content" %) ((( #foreach($category in $userMenu) #foreach($subcategory in $category.get('children')) #set($tabKey = $subcategory.get('id')) (% id="${tabKey}Pane" class="user-page-pane#if($tabKey != $currentCategory) hidden#end" %) ((( #set($tabInclude = $subcategory.get('sheet')) {{include reference="${tabInclude}" /}} ))) #end #end ))) ######################### ## END ######################### {{html clean="false"}} #if($xcontext.action == 'edit' || $xcontext.action == 'inline') <input type='hidden' name='category' value="$!{currentCategory}" /> #end <div class="clearfloats">&nbsp;</div> #if($request.get('xpage')) <script type="text/javascript"> document.fire('lightbox:userprofile:loaded'); </script> #end {{/html}} {{/velocity}}

# 快速链接

- 首页
- 新闻动态
- FAQ

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