User Sheet
Log-in
|
XWiki
:
WebHome
>
Users
>
User Sheet
Top Menu
Show
:
Comments
Attachments
History
Information
Stampa
:
Stampa
Anteprima di stampa
Esporta come PDF
Esporta in formato RTF
Esporta come HTML
Esporta in formato XAR
Wiki source code of
User Sheet
Hide line numbers
1: #set($obj = $doc.getObject("XWiki.XWikiUsers")) 2: #if(!$obj) 3: 1 $msg.get("xe.admin.users.sheet") 4: $msg.get("xe.admin.users.applyonusers") 5: #else 6: 7: #if($context.action=="view") 8: <div class="vcard"> 9: #end 10: 11: 1 $msg.get("platform.core.profile.title", [$xwiki.getUserName($doc.fullName, false)]) 12: 13: ##------------------------------------------------------------------ 14: ## Display a menu with common user actions: 15: ## - change password 16: ## - edit the profile 17: ## - change the avatar 18: ## - switch between simple/advanced modes 19: ## Note: This menu is only displayed if the current profile page is 20: ## that of the currently logged user 21: ##------------------------------------------------------------------ 22: #set($i = $context.user.indexOf(":")+1) 23: #set($isMyProfile = ($doc.fullName == $context.user.substring($i)) && ($context.action == "view")) 24: #if($isMyProfile || $xwiki.hasAdminRights()) 25: #if($isMyProfile) 26: #set($msgKeyEditSuffix = ".mine") 27: #end 28: <div class="specialmenu"> 29: ## Check user is not from LDAP. In that case we can’t modify the password has it is stored on LDAP server. 30: #if (!$doc.getObject("XWiki.LDAPProfileClass")) 31: * <img alt="" src="$xwiki.getSkinFile("icons/keys.png")"/> <a href="$doc.getURL("view", "xpage=passwd")">$msg.get("platform.core.profile.changePassword$!{msgKeyEditSuffix}")</a> 32: #end 33: * <img alt="" src="$xwiki.getSkinFile("icons/contact.png")"/> <a href="$doc.getURL("inline")">$msg.get("platform.core.profile.modifyProfile$!{msgKeyEditSuffix}")</a> 34: * <img alt="" src="$xwiki.getSkinFile("icons/changeavatar.png")"/> <a href="$doc.getURL("edit", "xpage=changemyavatar")">$msg.get("platform.core.profile.changePhoto$!{msgKeyEditSuffix}")</a> 35: ## Code to check whether the document’s user with usertype advanced. 36: #set($contextUserType = "$!{doc.getObject(’XWiki.XWikiUsers’).getProperty(’usertype’).value}") 37: #if($contextUserType == ’Advanced’) 38: #set($isContextUserAdvanced = true) 39: #else 40: #set($isContextUserAdvanced = false) 41: #end 42: #if($isContextUserAdvanced) 43: * <img alt="" src="$xwiki.getSkinFile("icons/simpleuser.png")"/> <a href="$doc.getURL("save", "XWiki.XWikiUsers_${obj.number}_usertype=Simple")">$msg.get("platform.core.profile.switchSimple")</a> 44: #else 45: * <img alt="" src="$xwiki.getSkinFile("icons/advanceduser.png")"/> <a href="$doc.getURL("save", "XWiki.XWikiUsers_${obj.number}_usertype=Advanced")">$msg.get("platform.core.profile.switchAdvanced")</a> 46: #end 47: </div> 48: #end 49: 50: #if($obj.getProperty("blogfeed") && $obj.getProperty("blogfeed").getValue() != "") 51: <div class="xwikiuserblog"> 52: {rss:feed=$doc.display("blogfeed", "view", $obj)|count=5} 53: </div> 54: #end 55: 56: #if($obj.getProperty("avatar") && $obj.getProperty("avatar").getValue() != "") 57: #foreach ($attach in $doc.attachmentList) 58: #if($attach.filename == $obj.getProperty("avatar").getValue()) 59: <a href="$doc.getAttachmentURL($attach.filename, "download")" > 60: <img class="photo" id="xwikiuseravatar" alt="$doc.display("first_name", "view", $obj)" src="$doc.getAttachmentURL($attach.filename, "download")"/> 61: </a> 62: #end 63: #end 64: #end 65: ## Please do not insert extra empty lines here (as it affects the validity of the rendered xhtml) 66: <dl id="xwikiuserprofile"> 67: <dt class="label"><label>$msg.get("platform.core.profile.firstname"):</label></dt> 68: <dd#if($context.action=="view") class="given-name"#end>$doc.display("first_name", $obj)</dd> 69: <dt class="label"><label>$msg.get("platform.core.profile.lastname"):</label></dt> 70: <dd#if($context.action=="view") class="family-name"#end>$doc.display("last_name", $obj)</dd> 71: #if(($obj.getProperty("blog") && $obj.getProperty("blog").getValue() != "") || $context.action == "inline") 72: <dt class="label"><label>$msg.get("platform.core.profile.blog"):</label></dt> 73: <dd>$doc.display("blog", $obj)</dd> 74: #end 75: #if(($obj.getProperty("blogfeed") && $obj.getProperty("blogfeed").getValue() != "") || $context.action == "inline") 76: <dt class="label"><label>$msg.get("platform.core.profile.blogFeed"):</label></dt> 77: <dd>$doc.display("blogfeed", $obj)</dd> 78: #end 79: ## For security reasons do not display emails by default 80: ## #if(($obj.getProperty("email") && $obj.getProperty("email").getValue() != "") || $context.action == "inline") 81: ## <dt class="label"><label>$msg.get("platform.core.profile.email"):</label></dt> 82: ## <dd#if($context.action=="view") class="email"#end>#if($action == "inline")$doc.display("email", $obj)#else #set($discard = $doc.display("email", $obj))#obfuscate($discard)#end</dd> 83: ## #end 84: #if(($obj.getProperty("company") && $obj.getProperty("company").getValue() != "") || $context.action == "inline") 85: <dt class="label"><label>$msg.get("platform.core.profile.company"):</label></dt> 86: <dd#if($context.action=="view") class="org"#end>$doc.display("company", $obj)</dd> 87: #end 88: #if(($obj.getProperty("city") && $obj.getProperty("city").getValue() != "") || $context.action == "inline") 89: <dt class="label"><label>$msg.get("platform.core.profile.city"):</label></dt> 90: <dd#if($context.action=="view") class="locality"#end>$doc.display("city", $obj)</dd> 91: #end 92: #if(($obj.getProperty("country") && $obj.getProperty("country").getValue() != "") || $context.action == "inline") 93: <dt class="label"><label>$msg.get("platform.core.profile.country"):</label></dt> 94: <dd#if($context.action=="view") class="country-name"#end>$doc.display("country", $obj)</dd> 95: #end 96: </dl> 97: 98: #if(($obj.getProperty("comment") && $obj.getProperty("comment").getValue().trim() != "") || $context.action == "inline") 99: 1.1 $msg.get("platform.core.profile.about") 100: $doc.display("comment", $obj) 101: #end 102: 103: #if($context.action=="view") 104: </div> 105: #end 106: 107: #end
Search
Quick Links
Wiki Dashboard
Document Index
Blog
Sandbox
My Recent Modifications
dany
|
marco