Changes for page Profile of XWikiUserSheet
Last modified by Ludovic Dubost on 2024/07/22 15:51
From version 11.1
edited by Ludovic Dubost
on 2022/04/20 17:59
on 2022/04/20 17:59
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-user-profile-ui/14.0]
To version 8.1
edited by Ludovic Dubost
on 2019/05/20 19:03
on 2019/05/20 19:03
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-user-profile-ui/11.3]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -8,21 +8,38 @@ 8 8 ## Setting categories 9 9 ######################### 10 10 #set($categories = []) 11 - 12 -# # loadtheusernu fromthe'org.xwiki.plaftorm.user.profile.menu' UIXP.13 -#f oreach($uix in $services.uix.getExtensions('org.xwiki.plaftorm.user.profile.menu',{'sortByParameter': 'priority'}))14 - # if(!$uix.parameters.containsKey('isActive')|| $uix.parameters.get('isActive')!='false')15 - if (!$uix.parameters.containsKey('id'))16 - # when no idexplicitly provided,we usedofthe UIX.17 - #set($discard= $uix.parameters.put('id',$uix.id))18 - nd19 - if($uix.parameters.containsKey('icon'))20 - set ($discard = $uix.parameters.put('glyphicon', $uix.parameters.get('icon')))21 - nd22 - set($discard = $uix.parameters.put('uix',$uix))23 - #set($discard = $categories.add( $uix.parameters))11 +#set($discard = $categories.add({'id':'profile', 'sheet':'XWiki.XWikiUserProfileSheet', 'glyphicon': 'user'})) 12 +#set($isMyProfile = ($services.model.resolveDocument($xcontext.user) == $doc.documentReference)) 13 +#if($isMyProfile || $hasAdmin) 14 + #set($discard = $categories.add({'id':'preferences', 'sheet':'XWiki.XWikiUserPreferencesSheet', 'glyphicon': 'wrench'})) 15 +#end 16 +#set($discard = $categories.add({'id':'groups', 'sheet':'XWiki.XWikiUserMembershipSheet', 'glyphicon': 'group'})) 17 +## TODO: add APIs to be able to display users watchlists to admins 18 +#if($isMyProfile && $hasWatch) 19 + #set($discard = $categories.add({'id':'watchlist', 'sheet':'XWiki.XWikiUserWatchListSheet', 'glyphicon': 'eye'})) 20 +#end 21 +#if($isMyProfile) 22 + #if ("$!services.notification.watch" != '' || $hasWatch) 23 + #set($discard = $categories.add({'id':'network', 'sheet':'XWiki.XWikiUserNetworkSheet', 'glyphicon': 'world'})) 24 24 #end 25 + ## TODO: add an enhancement system instead 26 + #set($notificationsSheet = $services.model.createDocumentReference('', ['XWiki', 'Notifications', 'Code'], 'XWikiUserNotificationsSheet')) 27 + #if ($xwiki.exists($notificationsSheet)) 28 + #set($discard = $categories.add({'id':'notifications', 'sheet':'XWiki.Notifications.Code.XWikiUserNotificationsSheet', 'glyphicon': 'bell'})) 29 + #end 25 25 #end 31 +#set($userWikiSheet = 'WikiManager.UserWikiSheet') 32 +#if($xcontext.isMainWiki() && $xwiki.exists($userWikiSheet)) 33 + #set($discard = $categories.add({ 34 + 'id': 'wikis', 35 + 'name': $services.localization.render('platform.wiki.menu.userwikis'), 36 + 'sheet': $userWikiSheet, 37 + 'glyphicon': 'list' 38 + })) 39 +#end 40 +#if($isMyProfile && $hasDashboard) 41 + #set($discard = $categories.add({'id':'dashboard', 'sheet':'Dashboard.XWikiUserDashboardSheet', 'glyphicon': 'th'})) 42 +#end 26 26 ######################### 27 27 ## Current category 28 28 ######################### ... ... @@ -65,7 +65,6 @@ 65 65 ## By specifying the image width we enable server side resizing. The width value we use is greater than the 66 66 ## available space because we don't want to loose too much of the image quality (we rely on the browser to fit the 67 67 ## image in the available space). 68 - #set($isMyProfile = ($services.model.resolveDocument($xcontext.user) == $doc.documentReference)) 69 69 {{attachmentSelector classname="XWiki.XWikiUsers" object="$obj.number" property="avatar" #if ($isMyProfile) savemode="direct" #end defaultValue="XWiki.XWikiUserSheet@noavatar.png" width="180" alternateText="$xwiki.getUserName($doc.fullName, false)" buttontext="$services.localization.render('platform.core.profile.changePhoto')" displayImage="true" filter="png,jpg,jpeg,gif"/}} 70 70 #end 71 71 ))) ... ... @@ -87,7 +87,8 @@ 87 87 #set($tabKey = $subcategory.get('id')) 88 88 (% id="${tabKey}Pane" class="user-page-pane#if($tabKey != $currentCategory) hidden#end" %) 89 89 ((( 90 - {{html}}$services.rendering.render($subcategory.uix.execute(), 'html/5.0'){{/html}} 106 + #set($tabInclude = $subcategory.get('sheet')) 107 + {{include reference="${tabInclude}" /}} 91 91 ))) 92 92 #end 93 93 #end
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -63,7 +63,7 @@ 63 63 if (history.pushState) { 64 64 var params = window.location.search.toQueryParams(); 65 65 params.category = category; 66 - varnewQueryString = Object.toQueryString(params);66 + newQueryString = Object.toQueryString(params); 67 67 68 68 var newURL = window.location.protocol + '//' + window.location.host + window.location.pathname + '?' + newQueryString; 69 69 window.history.pushState({category : category}, '', newURL);
- XWiki.StyleSheetExtension[0]
-
- Code
-
... ... @@ -115,6 +115,10 @@ 115 115 background-color: $theme.backgroundSecondaryColor; 116 116 } 117 117 118 +.userInfo { 119 + -ms-word-break: break-all; /* IE8, IE9 */ 120 +} 121 + 118 118 .userInfo a { 119 119 word-wrap: break-word; 120 120 } ... ... @@ -122,12 +122,7 @@ 122 122 .userInfo img { 123 123 max-width: 100%; 124 124 } 125 - 126 -.userInfo h2 { 127 - font-size: larger; 128 - font-weight: bolder; 129 -} 130 - 129 + 131 131 div.userInfo input[type="text"], div.userInfo input[type="password"], div.userInfo textarea, div.userInfo select, div.userPreferences select { 132 132 width: 100%; 133 133 }