General Actions:
Log-in
Wiki:
L3D's Wiki
▼
:
Document Index
»
Space:
XWiki
▼
:
Document Index
»
Page:
XWikiUserSheet
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
XWikiUsers
»
XWikiUserSheet
Wiki source code of
XWikiUserSheet
Last modified by
Administrator
on 2011/03/02 17:34
Content
·
Comments
(0)
·
Attachments
(1)
·
History
·
Information
Show line numbers
{{velocity}} ## ## Extensions and vars ## $xwiki.ssx.use("XWiki.XWikiUserSheet")## $xwiki.jsx.use("XWiki.XWikiUserSheet")## #set($obj = $doc.getObject("XWiki.XWikiUsers")) ## ## Categories ## #set($categories = $util.arrayList) #set($discard = $categories.add(['profile', $msg.get('platform.core.profile.category.profile'), 'XWiki.XWikiUserProfileSheet', 'icons/silk/vcard.gif'])) #set($isMyProfile = ($xcontext.user == $doc.fullName)) #if($isMyProfile || $hasAdmin) #set($discard = $categories.add(['preferences', $msg.get('platform.core.profile.category.preferences'), 'XWiki.XWikiUserPreferencesSheet', 'icons/silk/wrench.gif'])) #end ## TODO: add APIs to be able to display users watchlists to admins #if($isMyProfile && $hasWatch) #set($discard = $categories.add(['watchlist', $msg.get('platform.core.profile.category.watchlist'), 'XWiki.XWikiUserWatchListSheet', 'icons/silk/star.gif'])) #end ## ## Avatar ## #set($avatarURL = '') #if($obj.getProperty("avatar") && $obj.getProperty("avatar").getValue() != '') #foreach ($attach in $doc.attachmentList) #if($attach.filename == $obj.getProperty("avatar").getValue()) #set($avatarURL = "$doc.getAttachmentURL($attach.filename, 'download', 'width=120')") #end #end #end #if("$!avatarURL" == '') #set($avatarURL = $xwiki.getDocument("XWiki.XWikiUserSheet").getAttachmentURL('noavatar.png', 'download', 'width=120')) #end ## ## Current category ## #set($currentCategory = "$!request.category") #if($currentCategory == "") #set($currentCategory = $listtool.get($listtool.get($categories, 0), 0)) #end ## ## Display ## {{html clean="false"}} <div id="vertical-panes"> ## ## Tabs ## <div id="vertical-tabs"> <div id="avatar"> <span id="avatarUpload" class="hidden">$msg.get('platform.core.profile.changePhoto')</span> <a href="$doc.getURL('edit', 'xpage=changemyavatar')" ><img class="photo" id="xwikiuseravatar" alt="$doc.display('first_name', 'view', $obj)" src="$avatarURL"/></a> </div> <div> <ul> #foreach($tab in $categories) #set($tabKey = $listtool.get($tab, 0)) #set($tabName = $listtool.get($tab, 1)) #set($tabIcon = $listtool.get($tab, 3)) <li id="${tabKey}Tab" class="vertical-tab#if($tabKey == $currentCategory) active#end"><a href="?category=${tabKey}"><img src="$xwiki.getSkinFile($tabIcon)" alt="$tabName" /><span>$tabName</span></a><script type="text/javascript">Event.observe($("${tabKey}Tab"), 'click', function(event) { XWiki.userprofile.switchTab("${tabKey}"); Event.stop(event); });</script></li> #end </ul> </div> </div> ## ## Panes ## #foreach($tab in $categories) #set($tabKey = $listtool.get($tab, 0)) #set($tabInclude = $listtool.get($tab, 2)) <div id="${tabKey}Pane" class="vertical-pane#if($tabKey != $currentCategory) hidden#end"> {{/html}} {{include document="${tabInclude}" /}} {{html clean="false"}} </div> #end <div class="clearfloats"> </div> </div> {{/html}} {{/velocity}}
Quick Links
L3D Calendar
Wiki Dashboard
Document Index
Blog
Sandbox