Allgemeine Aktionen:
Anmelden
Registrieren
Start ▼: Wiki Verzeichnis
»
Bereich: XWiki
»
Seite: XWikiUserSheet
default
Aktionen:
Exportieren ▼: Als PDF exportieren Als RTF exportieren Als HTML exportieren
Weitere Aktionen ▼: Druckvorschau Zeige den Quellcode
XWikiUsers » Profil von XWikiUserSheet

# Wiki-Quellcode von Profil von XWikiUserSheet

Zuletzt geändert von Administrator am 2014/06/29 19:28
Anhänge (1) · Information
Zeilennummern anzeigen {{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($userWikiSheet = 'WikiManager.UserWikiSheet') #if($xcontext.isMainWiki() && $xwiki.exists($userWikiSheet)) #set($discard = $categories.add({ 'id': 'wikis', 'name': $services.localization.render('platform.wiki.menu.userwikis'), 'sheet': $userWikiSheet })) #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="$!{escapetool.xml($currentCategory)}" /> #end <div class="clearfloats">&nbsp;</div> #if($request.get('xpage')) <script type="text/javascript"> document.fire('lightbox:userprofile:loaded'); </script> #end {{/html}} {{/velocity}}

(c) 2026, by bytebang e.U. - Impressum - Datenschutz / Nutzungsbedingungen
-