General Actions:
Log-in
Register
Wiki:
games
▼
:
Document Index
»
Space:
XWiki
▼
:
Document Index
»
Page:
XWikiUserProfileSheet
Search
en
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
XWikiUsers
»
XWikiUserSheet
»
XWikiUserProfileSheet
Wiki source code of
XWikiUserProfileSheet
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: ## Allow $obfuscateEmail to be set in some other place. 4: #if("$!obfuscateEmail" == '') 5: #set($obfuscateEmail = true) 6: #end 7: #if(!$obj) 8: = $msg.get('xe.admin.users.sheet') = 9: 10: {{info}}$msg.get('xe.admin.users.applyonusers'){{/info}}## 11: #else 12: $doc.use($obj) 13: {{html clean="false" wiki="true"}} 14: #set($username = $xwiki.getUserName($doc.fullName, false)) 15: = $msg.get('platform.core.profile.title', [$username]) = 16: 17: #if($xcontext.action == 'view') 18: <div class="vcard"> 19: <span class="fn hidden">$username</span> 20: #end 21: $xwiki.ssx.use("XWiki.XWikiUserSheet")## 22: <div class="#if($context.action == 'view')half #{else}full #{end}column"> 23: <div class="userInfo"> 24: #if($xcontext.action == 'view' && $hasEdit) 25: <div class="editProfileCategory"><a href="$doc.getURL('inline', 'category=profile')"><span class="hidden">$msg.get('platform.core.profile.category.profile.edit')</span></a></div> 26: #end 27: ## Please do not insert extra empty lines here (as it affects the validity of the rendered xhtml) 28: <h1>$msg.get('platform.core.profile.section.personal')</h1> 29: <dl> 30: <dt class="label"><label>$msg.get('platform.core.profile.firstname')</label></dt> 31: <dd #if($xcontext.action == 'view')class="given-name"#end>$doc.display('first_name')</dd> 32: <dt class="label"><label>$msg.get('platform.core.profile.lastname')</label></dt> 33: <dd #if($xcontext.action == 'view')class="family-name"#end>$doc.display('last_name')</dd> 34: #if(($obj.getProperty('company') && $obj.getProperty('company').getValue() != '') || $xcontext.action != 'view') 35: <dt class="label"><label>$msg.get('platform.core.profile.company')</label></dt> 36: <dd #if($xcontext.action == 'view')class="org"#end>$doc.display('company')</dd> 37: #end 38: #if(($obj.getProperty('comment') && $obj.getProperty('comment').getValue() != '') || $xcontext.action != 'view') 39: <dt class="label"><label>$msg.get('platform.core.profile.about')</label></dt> 40: <dd #if($xcontext.action == 'view')class="note"#end>$doc.display('comment')</dd> 41: #end 42: </dl> 43: <h1>$msg.get('platform.core.profile.section.contact')</h1> 44: <dl> 45: <dt class="label"><label>$msg.get('platform.core.profile.email')</label></dt> 46: <dd #if($xcontext.action=="view")class="email"#end>#if($xcontext.action != 'view' || !$obfuscateEmail)$doc.display('email')#else $doc.display('email').replaceAll('@.*', '@ ~-~-~-~-~-~-')#end</dd> 47: <dt class="label"><label>$msg.get('platform.core.profile.phone')</label></dt> 48: <dd #if($xcontext.action == 'view')class="tel"#end>$doc.display('phone')</dd> 49: <dt class="label"><label>$msg.get('platform.core.profile.address')</label></dt> 50: <dd #if($xcontext.action == 'view')class="adr"#end>$doc.display('address')</dd> 51: </dl> 52: #set($hasBlog = ($obj.getProperty('blog') && $obj.getProperty('blog').getValue() != '')) 53: #set($hasBlogFeed = ($obj.getProperty('blogfeed') && $obj.getProperty('blogfeed').getValue() != '')) 54: #if($hasBlog || $hasBlogFeed || $xcontext.action != 'view') 55: <h1>$msg.get('platform.core.profile.section.links')</h1> 56: <dl> 57: #if($hasBlog || $xcontext.action != 'view') 58: <dt class="label"><label>$msg.get('platform.core.profile.blog')</label></dt> 59: <dd>$doc.display('blog')</dd> 60: #end 61: #if($hasBlogFeed || $xcontext.action != 'view') 62: <dt class="label"><label>$msg.get('platform.core.profile.blogFeed')</label></dt> 63: <dd>$doc.display('blogfeed')</dd> 64: #end 65: </dl> 66: #end 67: </div> 68: </div> 69: #if ($xcontext.action == 'view') 70: <div class="half column"> 71: <div class="userRecentChanges"> 72: #if ($context.user == $doc.fullName) 73: <h1>$msg.get('platform.core.profile.section.activity')</h1> 74: #else 75: <h1>$msg.get('platform.core.profile.section.activityof', [$xwiki.getUserName($doc.fullName, false)])</h1> 76: #if ($hasWatch) 77: $xwiki.ssx.use('XWiki.XWikiUserProfileSheet')## 78: <div class="activity-follow"> 79: #set ($xredirect = $doc.getURL($context.action, $request.queryString)) 80: #if ($xwiki.watchlist.isUserWatched(${doc.prefixedFullName})) 81: <span class="following">$msg.get('xe.activity.messages.following')</span> 82: <a class="action unfollow" href="$doc.getURL('view', "xpage=watch&do=removeuser&xredirect=${escapetool.url($xredirect)}")">$msg.get('xe.activity.messages.unfollow')</a> 83: #else 84: <a class="action follow" href="$doc.getURL('view', "xpage=watch&do=adduser&xredirect=${escapetool.url($xredirect)}")">$msg.get('xe.activity.messages.follow')</a> 85: #end 86: </div> 87: #end 88: #end 89: {{/html}} 90: 91: {{activity authors="${doc.fullName},${doc.prefixedFullName}" /}} 92: 93: {{html clean="false"}} 94: </div> 95: </div> 96: #end 97: <div class="clearfloats"> </div> 98: #if($xcontext.action == 'view') 99: ## Close the vcard 100: </div> 101: #end 102: {{/html}}## 103: #end 104: {{/velocity}}