Découvrez les nouveautés de cette version : Fonctionnalités, améliorations et évolutions vous attendent ! 👉 Cliquez ici pour en savoir plus

Modifications pour le document Team

Modifié par superadmin le 21/07/2025 - 08:55

Depuis la version 3.1
modifié par Admin
sur 01/02/2025 - 11:40
Commentaire de modification : Install extension [com.xwiki.pro:xwiki-pro-macros-ui/1.26.1]
À la version 1.1
modifié par Admin
sur 24/06/2024 - 15:21
Commentaire de modification : Install extension [com.xwiki.pro:xwiki-pro-macros/1.18.3]

Résumé

Détails

XWiki.StyleSheetExtension[0]
Code
... ... @@ -1,4 +1,4 @@
1 -.xwikiteam-ul {
1 +.xwikiteam .xwikiteam-ul {
2 2   list-style: none;
3 3   padding: 0;
4 4   margin: 0;
... ... @@ -7,10 +7,6 @@
7 7   flex-direction: row;
8 8  }
9 9  
10 -.xwikiteam {
11 - display: inline-block;
12 -}
13 -
14 14  .xwikiteam .xwikiteam-user, .xwikiteam-tools-link {
15 15   padding: 0;
16 16   margin: 0;
XWiki.WikiMacroClass[0]
Code de la macro
... ... @@ -3,8 +3,10 @@
3 3   #set($escapedSize = $escapetool.xml($size))
4 4   #set($escapedLetterAvatarFontColor = $escapetool.xml($letterAvatarFontColor))
5 5   #set($escapedLetterAvatarBgColor = $escapetool.xml($letterAvatarBgColor))
6 - <span class="xwikiteam-avatar xwikiteam-avatar-initials"
7 - style="height:${escapedSize}px; width:${escapedSize}px; border-radius: ${escapedSize}px; background-color: $escapedLetterAvatarBgColor">
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 + >
8 8   <span class="xwikiteam-avatar-initials-inner">
9 9   <span class="xwikiteam-avatar-initials-letters" style="color: $escapedLetterAvatarFontColor">
10 10   #foreach($firstLetter in $name.toUpperCase().split("[\s\[\]-]+"))$escapetool.xml($firstLetter.charAt(0))#end
... ... @@ -17,11 +17,13 @@
17 17   #set($url = $xwiki.getURL($username))
18 18   #set($escapedDisplayUser = $escapetool.xml($displayUser))
19 19   #set($fontSize = $size / 3)
20 - <span class="xwikiteam-user"
22 + <li
23 + class="xwikiteam-user"
21 21   data-name-without-accents="$util.clearAccents($escapedDisplayUser.toLowerCase())"
22 22   title="$escapedDisplayUser"
23 23   data-username="$escapetool.xml($username)"
24 - style="font-size: ${fontSize}px">
27 + style="font-size: ${fontSize}px"
28 + >
25 25   <a href="$url">
26 26   #getUserAvatarURL($username $return $size)
27 27   #if(!$return.specified && !$disableLetterAvatars)
... ... @@ -39,7 +39,7 @@
39 39   #end
40 40   <span class='xwikiteam-username'>$escapedDisplayUser</span>
41 41   </a>
42 - </span>
46 + </li>
43 43  #end
44 44  #macro (addUsersFromWiki $list $wiki $limit $tag $userList)
45 45   #set($q = $services.query.hql($hql).setLimit($limit).setWiki($wiki))
... ... @@ -117,14 +117,8 @@
117 117   #set($userList = [])
118 118   #set($userswhere = '')
119 119   #else
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
124 + #set($userswhere = 'and doc.fullName in :users')
125 + #set($userList = $users.split(","))
128 128   #end
129 129   #if(!$tag || $tag == "")
130 130   #set($tagselect = "")
... ... @@ -141,7 +141,7 @@
141 141   obj3.className = 'XWiki.TagClass' and
142 142   obj3.id = tagprop.id.id and
143 143   tagprop.id.name = 'tags' and
144 - list = :tag
142 + list = ':tag'
145 145   ")
146 146   #end
147 147   #set($hql = ",
... ... @@ -177,58 +177,47 @@
177 177   #addUsersFromWiki($list $xcontext.mainWikiName $limit $tag $userList)
178 178   #end
179 179   #end
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"}}
178 + {{html clean=false}}
190 190   ## Starting with XWiki 13.10.4 and 14.1, img tags have a 'height: auto' style set, see XWIKI-19432: Image not to scale
191 191   ## on mobile. Since this breaks the macro fixed size feature, a specific size is added.
192 192   #set ($escapedSize = $escapetool.xml($size))
193 - <$elem>
182 + <div>
194 194   <style>
195 195   .fixedSize-$escapedSize {
196 196   height: ${escapedSize}px;
197 197   }
198 198   </style>
199 - </$elem>
200 - <$elem class="xwikiteam #if(!$showUsernames)xwikiteam-usernames-hidden#end">
188 + </div>
189 + <div class="xwikiteam #if(!$showUsernames)xwikiteam-usernames-hidden#end">
201 201   #if ($list.size() > 0)
202 - <span class="xwikiteam-ul">
191 + <ul class="xwikiteam-ul">
203 203   #foreach($user in $list)
204 204   #avatar($user $size $disableLetterAvatars $letterAvatarBgColor $letterAvatarFontColor)
205 205   #end
206 - #if (!$disableTools && !$wikimacro.context.isInline())
207 - <span class="xwikiteam-tools-link" hidden="hidden">
195 + #if(!$disableTools)
196 + <li class="xwikiteam-tools-link" hidden="hidden">
208 208   <a href="#" role="button" title="$escapetool.xml($services.localization.render('rendering.macro.team.content.options'))">
209 209   <span class="fa fa-wrench"></span>
210 210   <span class="sr-only">$escapetool.xml($services.localization.render('rendering.macro.team.content.options'))</span>
211 211   </a>
212 - </span>
201 + </li>
213 213   #end
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
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>
228 228   #else
229 - <$elem>$escapetool.xml($services.localization.render('rendering.macro.team.content.noUsers'))</$elem>
216 + <p>$escapetool.xml($services.localization.render('rendering.macro.team.content.noUsers'))</p>
230 230   #end
231 - </$elem>
218 + </div>
232 232   {{/html}}
233 233  #end
234 234  {{/velocity}}
... ... @@ -237,7 +237,7 @@
237 237  ## We need to check if there is a valid license because the macro is registered even if the user doesn't have view right
238 238  ## on the macro definition page. See XWIKI-14828: Rendering macros defined in wiki pages are available to users that
239 239  ## don't have view right on those pages.
240 -#if ($services.promacrolicensing.hasLicensureForEntity($xcontext.macro.doc.documentReference))
227 +#if ($services.licensing.licensor.hasLicensureForEntity($xcontext.macro.doc.documentReference))
241 241   #executeMacro
242 242  #else
243 243   {{missingLicenseMessage extensionName="proMacros.extension.name"/}}
Support du mode en ligne
... ... @@ -1,1 +1,1 @@
1 -Oui
1 +Non