Changes for page Users

From version 6.1
edited by Andrea Omicini
on 2026/08/29 00:51
Change comment: There is no comment for this version
To version 4.1
edited by Andrea Omicini
on 2026/08/29 00:47
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -17,15 +17,12 @@
17 17  #foreach( $s in $statusList )
18 18   #set( $discard = $people.put($s, []) )
19 19  #end
20 -## distinct: a user page with a translation (XWiki.AntonioNatali.it) returns one row per locale
21 -#set( $rows = $services.query.xwql("select distinct doc.fullName from Document doc, doc.object(XWiki.XWikiUsers) as u where u.status <> ''").execute() )
22 -#set( $seen = [] )
20 +#set( $rows = $services.query.xwql("from doc.object(XWiki.XWikiUsers) as u where u.status <> ''").execute() )
23 23  #foreach( $ref in $rows )
24 24   #set( $uDoc = $xwiki.getDocument($ref) )
25 25   #set( $uObj = $uDoc.getObject('XWiki.XWikiUsers') )
26 26   #set( $st = "$!uObj.getValue('status')" )
27 - #if( $people.containsKey($st) && !$seen.contains($ref) )
28 - #set( $discard = $seen.add($ref) )
25 + #if( $people.containsKey($st) )
29 29   ## sort key: surname, then given name, then the reference
30 30   #set( $last = "$!uObj.getValue('last_name')" )
31 31   #set( $first = "$!uObj.getValue('first_name')" )
... ... @@ -33,10 +33,14 @@
33 33   #end
34 34  #end
35 35  ##
36 -## one person: given name + bold surname, linked to their XWiki user page
33 +## one person: given name + bold surname, linked to the personal space when there is one
37 37  #macro( apicePerson $entry )
38 38   #set( $bits = $entry.split('\|') )
39 -[[${bits[1]} **${bits[0]}**>>${bits[2]}]]##
36 + #set( $pDoc = $xwiki.getDocument($bits[2]) )
37 + #set( $pObj = $pDoc.getObject('XWiki.XWikiUsers') )
38 + #set( $space = "$!pObj.getValue('personalWiki')" )
39 + #if( $space != '' && $xwiki.exists("${space}.WebHome") )#set( $target = "${space}.WebHome" )#else#set( $target = $bits[2] )#end
40 +[[${bits[1]} **${bits[0]}**>>${target}]]##
40 40  #end
41 41  ##
42 42  ## a section, printed only when somebody is in it
... ... @@ -59,6 +59,9 @@
59 59   #end
60 60  #end
61 61  ##
63 +#### STUDENTS
64 +#apiceGroup('Student')
65 +##
62 62  #### PAST MEMBERS
63 63  #apiceGroup('Gone')
64 64  ##
... ... @@ -77,4 +77,3 @@
77 77  
78 78  #end
79 79  {{/velocity}}
80 -