Modifications pour le document Team
Modifié par superadmin le 21/07/2025 - 08:55
Résumé
-
Objets (2 modifications, 0 ajouts, 0 suppressions)
Détails
- XWiki.StyleSheetExtension[0]
-
- Code
-
... ... @@ -1,4 +1,4 @@ 1 -.xwikiteam .xwikiteam-ul {1 +.xwikiteam-ul { 2 2 list-style: none; 3 3 padding: 0; 4 4 margin: 0; ... ... @@ -7,6 +7,10 @@ 7 7 flex-direction: row; 8 8 } 9 9 10 +.xwikiteam { 11 + display: inline-block; 12 +} 13 + 10 10 .xwikiteam .xwikiteam-user, .xwikiteam-tools-link { 11 11 padding: 0; 12 12 margin: 0;
- XWiki.WikiMacroClass[0]
-
- Code de la macro
-
... ... @@ -3,10 +3,8 @@ 3 3 #set($escapedSize = $escapetool.xml($size)) 4 4 #set($escapedLetterAvatarFontColor = $escapetool.xml($letterAvatarFontColor)) 5 5 #set($escapedLetterAvatarBgColor = $escapetool.xml($letterAvatarBgColor)) 6 - <span 7 - class="xwikiteam-avatar xwikiteam-avatar-initials" 8 - style="height:${escapedSize}px; width:${escapedSize}px; border-radius: ${escapedSize}px; background-color: $escapedLetterAvatarBgColor" 9 - > 6 + <span class="xwikiteam-avatar xwikiteam-avatar-initials" 7 + style="height:${escapedSize}px; width:${escapedSize}px; border-radius: ${escapedSize}px; background-color: $escapedLetterAvatarBgColor"> 10 10 <span class="xwikiteam-avatar-initials-inner"> 11 11 <span class="xwikiteam-avatar-initials-letters" style="color: $escapedLetterAvatarFontColor"> 12 12 #foreach($firstLetter in $name.toUpperCase().split("[\s\[\]-]+"))$escapetool.xml($firstLetter.charAt(0))#end ... ... @@ -19,13 +19,11 @@ 19 19 #set($url = $xwiki.getURL($username)) 20 20 #set($escapedDisplayUser = $escapetool.xml($displayUser)) 21 21 #set($fontSize = $size / 3) 22 - <li 23 - class="xwikiteam-user" 20 + <span class="xwikiteam-user" 24 24 data-name-without-accents="$util.clearAccents($escapedDisplayUser.toLowerCase())" 25 25 title="$escapedDisplayUser" 26 26 data-username="$escapetool.xml($username)" 27 - style="font-size: ${fontSize}px" 28 - > 24 + style="font-size: ${fontSize}px"> 29 29 <a href="$url"> 30 30 #getUserAvatarURL($username $return $size) 31 31 #if(!$return.specified && !$disableLetterAvatars) ... ... @@ -43,7 +43,7 @@ 43 43 #end 44 44 <span class='xwikiteam-username'>$escapedDisplayUser</span> 45 45 </a> 46 - </ li>42 + </span> 47 47 #end 48 48 #macro (addUsersFromWiki $list $wiki $limit $tag $userList) 49 49 #set($q = $services.query.hql($hql).setLimit($limit).setWiki($wiki)) ... ... @@ -121,8 +121,14 @@ 121 121 #set($userList = []) 122 122 #set($userswhere = '') 123 123 #else 124 - #set($userswhere = 'and doc.fullName in :users') 125 - #set($userList = $users.split(",")) 120 + #set ($userswhere = 'and doc.fullName in :users') 121 + #set ($userReferencesList = $users.split(",")) 122 + #set ($userList = []) 123 + #foreach ($user in $userReferencesList) 124 + #set ($resolvedRef = $services.model.resolveDocument($user)) 125 + #set ($username = $xwiki.getUser($resolvedRef).getUser().getFullName()) 126 + #set ($discard = $userList.add($username)) 127 + #end 126 126 #end 127 127 #if(!$tag || $tag == "") 128 128 #set($tagselect = "") ... ... @@ -139,7 +139,7 @@ 139 139 obj3.className = 'XWiki.TagClass' and 140 140 obj3.id = tagprop.id.id and 141 141 tagprop.id.name = 'tags' and 142 - list = ':tag'144 + list = :tag 143 143 ") 144 144 #end 145 145 #set($hql = ", ... ... @@ -175,47 +175,58 @@ 175 175 #addUsersFromWiki($list $xcontext.mainWikiName $limit $tag $userList) 176 176 #end 177 177 #end 178 - {{html clean=false}} 180 + #set ($elem = 'div') 181 + #set ($clean = true) 182 + #if ($wikimacro.context.isInline()) 183 + #set ($elem = 'span') 184 + #set ($clean = false) 185 + #end 186 + #if ($xcontext.getAction()=='edit') 187 + #set ($clean = true) 188 + #end 189 + {{html clean="$clean"}} 179 179 ## Starting with XWiki 13.10.4 and 14.1, img tags have a 'height: auto' style set, see XWIKI-19432: Image not to scale 180 180 ## on mobile. Since this breaks the macro fixed size feature, a specific size is added. 181 181 #set ($escapedSize = $escapetool.xml($size)) 182 - < div>193 + <$elem> 183 183 <style> 184 184 .fixedSize-$escapedSize { 185 185 height: ${escapedSize}px; 186 186 } 187 187 </style> 188 - </ div>189 - < divclass="xwikiteam #if(!$showUsernames)xwikiteam-usernames-hidden#end">199 + </$elem> 200 + <$elem class="xwikiteam #if(!$showUsernames)xwikiteam-usernames-hidden#end"> 190 190 #if ($list.size() > 0) 191 - < ulclass="xwikiteam-ul">202 + <span class="xwikiteam-ul"> 192 192 #foreach($user in $list) 193 193 #avatar($user $size $disableLetterAvatars $letterAvatarBgColor $letterAvatarFontColor) 194 194 #end 195 - #if(!$disableTools) 196 - < liclass="xwikiteam-tools-link" hidden="hidden">206 + #if (!$disableTools && !$wikimacro.context.isInline()) 207 + <span class="xwikiteam-tools-link" hidden="hidden"> 197 197 <a href="#" role="button" title="$escapetool.xml($services.localization.render('rendering.macro.team.content.options'))"> 198 198 <span class="fa fa-wrench"></span> 199 199 <span class="sr-only">$escapetool.xml($services.localization.render('rendering.macro.team.content.options'))</span> 200 200 </a> 201 - </ li>212 + </span> 202 202 #end 203 - </ul> 204 - <div class="xwikiteam-tools" hidden="hidden"> 205 - <input class="xwikiteam-filter" type="text" placeholder="$escapetool.xml($services.localization.render('rendering.macro.team.content.filter'))" /> 206 - <label> 207 - <input 208 - class="xwikiteam-show-username-checkbox" 209 - type="checkbox" 210 - #if($showUsernames)checked="checked"#end 211 - /> 212 - $escapetool.xml($services.localization.render('rendering.macro.team.content.showUsernames')) 213 - </label> 214 - </div> 214 + </span> 215 + #if (!$disableTools && !$wikimacro.context.isInline()) 216 + <span class="xwikiteam-tools" hidden="hidden"> 217 + <input class="xwikiteam-filter" type="text" placeholder="$escapetool.xml($services.localization.render('rendering.macro.team.content.filter'))" /> 218 + <label> 219 + <input 220 + class="xwikiteam-show-username-checkbox" 221 + type="checkbox" 222 + #if($showUsernames)checked="checked"#end 223 + /> 224 + $escapetool.xml($services.localization.render('rendering.macro.team.content.showUsernames')) 225 + </label> 226 + </span> 227 + #end 215 215 #else 216 - < p>$escapetool.xml($services.localization.render('rendering.macro.team.content.noUsers'))</p>229 + <$elem>$escapetool.xml($services.localization.render('rendering.macro.team.content.noUsers'))</$elem> 217 217 #end 218 - </ div>231 + </$elem> 219 219 {{/html}} 220 220 #end 221 221 {{/velocity}} ... ... @@ -224,7 +224,7 @@ 224 224 ## We need to check if there is a valid license because the macro is registered even if the user doesn't have view right 225 225 ## on the macro definition page. See XWIKI-14828: Rendering macros defined in wiki pages are available to users that 226 226 ## don't have view right on those pages. 227 -#if ($services.licensing. licensor.hasLicensureForEntity($xcontext.macro.doc.documentReference))240 +#if ($services.promacrolicensing.hasLicensureForEntity($xcontext.macro.doc.documentReference)) 228 228 #executeMacro 229 229 #else 230 230 {{missingLicenseMessage extensionName="proMacros.extension.name"/}} - Support du mode en ligne
-
... ... @@ -1,1 +1,1 @@ 1 - Non1 +Oui