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
Show line numbers
{{velocity}} #set($obj = $doc.getObject('XWiki.XWikiUsers')) #if(!$obj) = $msg.get('xe.admin.users.sheet') = {{info}}$msg.get('xe.admin.users.applyonusers'){{/info}}## #else $doc.use($obj) #set($isMyProfile = ($xcontext.user == $doc.fullName)) #if ($isMyProfile && $hasWatch) #set($followedUsers = $xwiki.watchlist.getWatchedUsers()) ## FIXME: This is an ugly workaround for an even uglier bug in the watchlist ## plugin: the first item in the list is an empty string #if ($followedUsers.size() > 0 && "$!followedUsers.get(0)" == '') #set ($discard = $followedUsers.remove(0)) #end {{html clean="false" wiki="true"}} #set($username = $xwiki.getUserName($doc.fullName, false)) $xwiki.ssx.use("XWiki.XWikiUserSheet")## $xwiki.ssx.use("XWiki.XWikiUserProfileSheet")## $xwiki.jsx.use("XWiki.XWikiUserNetworkSheet")## <div class="half column"> <div class="following profile-section highlighted-profile-section"> ## Please do not insert extra empty lines here (as it affects the validity of the rendered xhtml) <h1>$msg.get('platform.core.profile.section.following')</h1> #if (!$followedUsers || $followedUsers.size() == 0) $msg.get('platform.core.profile.section.following.none') #else <ul> #foreach ($followedUser in $followedUsers) #set ($authorsParam = $services.model.serialize($services.model.resolveDocument($xcontext.user), 'default')) #set ($userDocument = $xwiki.getDocument($followedUser)) ## Prepare the list of followed users as it appears in the activity macro parameter ## (do it here to avoid another foreach loop later) #set ($authorsParam = "$!{authorsParam},${userDocument.fullName},${userDocument.prefixedFullName}") ## Display the user info <li class="vcard"> #set ($userID = $userDocument.name) #smallUserAvatar($followedUser) <span class="user-info"><span class="fn">$xwiki.getUserName($followedUser)</span> <span class="user-id">($userID)</span></span> <span class="userstatus-follow"> #set ($xredirect = $doc.getURL($context.action, $request.queryString)) <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> </span> <div class="clearfloats"> </div> </li> #end </ul> #end </div> </div> #if ($followedUsers.size() > 0) <div class="half column"> <div class="networkActivity profile-section"> <h1>$msg.get('platform.core.profile.section.networkActivity')</h1> {{/html}} {{activity authors="$!{authorsParam}" /}} {{html clean="false"}} </div> </div> #end## $followedUsers.size() > 0 <div class="clearfloats"> </div> {{/html}}## #end## isMyProfile && $isMessageStreamActive && $hasWatch #end## User object exists {{/velocity}}