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
Hide line numbers
1: {{velocity}} 2: ## 3: ## Extensions and vars 4: ## 5: $xwiki.ssx.use("XWiki.XWikiUserSheet")## 6: $xwiki.jsx.use("XWiki.XWikiUserSheet")## 7: #set($obj = $doc.getObject("XWiki.XWikiUsers")) 8: ## 9: ## Categories 10: ## 11: #set($categories = $util.arrayList) 12: #set($discard = $categories.add(['profile', $msg.get('platform.core.profile.category.profile'), 'XWiki.XWikiUserProfileSheet', 'icons/silk/vcard.gif'])) 13: #set($isMyProfile = ($xcontext.user == $doc.fullName)) 14: #if($isMyProfile || $hasAdmin) 15: #set($discard = $categories.add(['preferences', $msg.get('platform.core.profile.category.preferences'), 'XWiki.XWikiUserPreferencesSheet', 'icons/silk/wrench.gif'])) 16: #end 17: ## TODO: add APIs to be able to display users watchlists to admins 18: #if($isMyProfile && $hasWatch) 19: #set($discard = $categories.add(['watchlist', $msg.get('platform.core.profile.category.watchlist'), 'XWiki.XWikiUserWatchListSheet', 'icons/silk/star.gif'])) 20: #end 21: ## 22: ## Avatar 23: ## 24: #set($avatarURL = '') 25: #if($obj.getProperty("avatar") && $obj.getProperty("avatar").getValue() != '') 26: #foreach ($attach in $doc.attachmentList) 27: #if($attach.filename == $obj.getProperty("avatar").getValue()) 28: #set($avatarURL = "$doc.getAttachmentURL($attach.filename, 'download', 'width=120')") 29: #end 30: #end 31: #end 32: #if("$!avatarURL" == '') 33: #set($avatarURL = $xwiki.getDocument("XWiki.XWikiUserSheet").getAttachmentURL('noavatar.png', 'download', 'width=120')) 34: #end 35: ## 36: ## Current category 37: ## 38: #set($currentCategory = "$!request.category") 39: #if($currentCategory == "") 40: #set($currentCategory = $listtool.get($listtool.get($categories, 0), 0)) 41: #end 42: ## 43: ## Display 44: ## 45: {{html clean="false"}} 46: <div id="vertical-panes"> 47: ## 48: ## Tabs 49: ## 50: <div id="vertical-tabs"> 51: <div id="avatar"> 52: <span id="avatarUpload" class="hidden">$msg.get('platform.core.profile.changePhoto')</span> 53: <a href="$doc.getURL('edit', 'xpage=changemyavatar')" ><img class="photo" id="xwikiuseravatar" alt="$doc.display('first_name', 'view', $obj)" src="$avatarURL"/></a> 54: </div> 55: <div> 56: <ul> 57: #foreach($tab in $categories) 58: #set($tabKey = $listtool.get($tab, 0)) 59: #set($tabName = $listtool.get($tab, 1)) 60: #set($tabIcon = $listtool.get($tab, 3)) 61: <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> 62: #end 63: </ul> 64: </div> 65: </div> 66: ## 67: ## Panes 68: ## 69: #foreach($tab in $categories) 70: #set($tabKey = $listtool.get($tab, 0)) 71: #set($tabInclude = $listtool.get($tab, 2)) 72: <div id="${tabKey}Pane" class="vertical-pane#if($tabKey != $currentCategory) hidden#end"> 73: {{/html}} 74: 75: {{include document="${tabInclude}" /}} 76: 77: {{html clean="false"}} 78: </div> 79: #end 80: <div class="clearfloats"> </div> 81: </div> 82: {{/html}} 83: {{/velocity}}
Quick Links
L3D Calendar
Wiki Dashboard
Document Index
Blog
Sandbox