General Actions:
Log-in
Register
Wiki:
games
▼
:
Document Index
»
Space:
XWiki
▼
:
Document Index
»
Page:
XWikiUserNetworkSheet
Search
default
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
XWikiUsers
»
XWikiUserSheet
»
XWikiUserNetworkSheet
Wiki source code of
XWikiUserNetworkSheet
Last modified by
Administrator
on 2011/11/06 20:09
Content
·
Comments
(0)
·
Annotations
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: {{velocity}} 2: #set($obj = $doc.getObject('XWiki.XWikiUsers')) 3: #if(!$obj) 4: = $msg.get('xe.admin.users.sheet') = 5: 6: {{info}}$msg.get('xe.admin.users.applyonusers'){{/info}}## 7: #else 8: $doc.use($obj) 9: #set($isMyProfile = ($xcontext.user == $doc.fullName)) 10: #if ($isMyProfile && $hasWatch) 11: #set($followedUsers = $xwiki.watchlist.getWatchedUsers()) 12: ## FIXME: This is an ugly workaround for an even uglier bug in the watchlist 13: ## plugin: the first item in the list is an empty string 14: #if ($followedUsers.size() > 0 && "$!followedUsers.get(0)" == '') 15: #set ($discard = $followedUsers.remove(0)) 16: #end 17: {{html clean="false" wiki="true"}} 18: #set($username = $xwiki.getUserName($doc.fullName, false)) 19: $xwiki.ssx.use("XWiki.XWikiUserSheet")## 20: $xwiki.ssx.use("XWiki.XWikiUserProfileSheet")## 21: $xwiki.jsx.use("XWiki.XWikiUserNetworkSheet")## 22: <div class="half column"> 23: <div class="following profile-section highlighted-profile-section"> 24: ## Please do not insert extra empty lines here (as it affects the validity of the rendered xhtml) 25: <h1>$msg.get('platform.core.profile.section.following')</h1> 26: #if (!$followedUsers || $followedUsers.size() == 0) 27: $msg.get('platform.core.profile.section.following.none') 28: #else 29: <ul> 30: #foreach ($followedUser in $followedUsers) 31: #set ($authorsParam = $services.model.serialize($services.model.resolveDocument($xcontext.user), 'default')) 32: #set ($userDocument = $xwiki.getDocument($followedUser)) 33: ## Prepare the list of followed users as it appears in the activity macro parameter 34: ## (do it here to avoid another foreach loop later) 35: #set ($authorsParam = "$!{authorsParam},${userDocument.fullName},${userDocument.prefixedFullName}") 36: ## Display the user info 37: <li class="vcard"> 38: #set ($userID = $userDocument.name) 39: #smallUserAvatar($followedUser) 40: <span class="user-info"><span class="fn">$xwiki.getUserName($followedUser)</span> <span class="user-id">($userID)</span></span> 41: <span class="userstatus-follow"> 42: #set ($xredirect = $doc.getURL($context.action, $request.queryString)) 43: <a class="action unfollow" href="$userDocument.getURL('view', "xpage=watch&do=removeuser&xredirect=${escapetool.url($xredirect)}")" title="$msg.get('xe.activity.messages.unfollow')">$msg.get('xe.activity.messages.unfollow')</a> 44: </span> 45: <div class="clearfloats"> </div> 46: </li> 47: #end 48: </ul> 49: #end 50: </div> 51: </div> 52: #if ($followedUsers.size() > 0) 53: <div class="half column"> 54: <div class="networkActivity profile-section"> 55: <h1>$msg.get('platform.core.profile.section.networkActivity')</h1> 56: {{/html}} 57: 58: {{activity authors="$!{authorsParam}" /}} 59: 60: {{html clean="false"}} 61: </div> 62: </div> 63: #end## $followedUsers.size() > 0 64: <div class="clearfloats"> </div> 65: {{/html}}## 66: #end## isMyProfile && $isMessageStreamActive && $hasWatch 67: #end## User object exists 68: {{/velocity}}