Show last authors
1 = {{italiano}}Per anno{{/italiano}}{{english}}Per Year{{/english}} =
2
3 {{include reference="Events.Environment" excludeFirstHeading="true"/}}{{velocity}}
4 #set( $eventMenu = true )
5 #### Setting year variables
6 ## set from caller page: $firstYearEvent, $lastYearEv
7 ## get environment variables & derived
8 #set( $firstYear = $mathtool.toInteger($firstYearEvent) )
9 #set( $lastYear = $mathtool.toInteger($lastYearEvent) )
10 #set( $yearList = [$lastYear..$firstYear] )
11 #set( $yearPar = 0 )
12 #set( $fromPar = 0 )
13 #set( $toPar = 0 )
14 ### START YEAR
15 ## defaults
16 #set( $oneYear = false )
17 #set( $selectedYear = '' )
18 ## year parameters
19 #if( $request.year )
20 #set( $yearPar = $mathtool.toInteger($request.year) )
21 #end
22 #if( $request.from )
23 #set( $fromPar = $mathtool.toInteger($request.from) )
24 #end
25 #if( $request.to )
26 #set( $toPar = $mathtool.toInteger($request.to) )
27 #end
28 ##set years
29 #if( $yearPar > 0 )
30 #set( $oneYear = true )
31 #set( $firstYear = $yearPar )
32 #set( $lastYear = $yearPar )
33 #set( $selectedYear = $yearPar )
34 #set( $yearList = [$yearPar] )
35 #else
36 #if( $fromPar != '' && $fromPar > 0 && ($fromPar > $firstYear) )
37 #set( $firstYear = $fromPar )
38 #set( $yearList = [$lastYear..$firstYear] )
39 #end
40 #if( $toPar != '' && $toPar > 0 && ($toPar < $lastYear) )
41 #set( $lastYear = $toPar )
42 #set( $yearList = [$lastYear..$firstYear] )
43 #end
44 #if( $lastYear <= $firstYear )
45 #set( $oneYear = true )
46 #set( $lastYear = $firstYear )
47 #set( $selectedYear = $firstYear )
48 #set( $yearList = [$firstYear] )
49 #else
50 #set( $yearList = [$lastYear..$firstYear] )
51 #end
52 #end
53 ## $selectedYear, $yearList and $oneYear set properly
54 ### END YEAR
55 ##
56 ### START USER
57 ## default values
58 #set( $oneUser = false )
59 #set( $selectedUser = '' )
60 #set( $userFirstName = "" )
61 #set( $userLastName = "" )
62 ## user parameter
63 #if( $request.user )
64 #set( $userNamePar = $request.user.trim() )
65 #end
66 #if( $userName || $userNamePar )
67 ## try to specify a user
68 #if( !$userName )
69 #set( $selectedUser = "XWiki.$userNamePar" )
70 #else
71 #set( $selectedUser = $userName )
72 #end
73 #if( $xwiki.exists($selectedUser) )
74 #set( $oneUser = true )
75 #set( $userdoc = $xwiki.getDocument($selectedUser) )
76 #set( $userFirstName = $userdoc.display("first_name") )
77 #set( $userLastName = $userdoc.display("last_name") )
78 #else
79 {{warning}} $selectedUser is not an {{apice/}} user{{/warning}}
80 #stop
81 #end
82 #end
83 ## $selectedUser and $oneUser set properly
84 ### END USER
85 ##
86 #### Preparing the web page
87 ##
88 ## top anchor
89 ##{{id='top'/}}
90 ##
91 ## Page title
92 ##
93 >{{stringEngIta eng='Events' ita='Eventi'/}} / **#if( $oneYear )$selectedYear#else$firstYear–$lastYear#end**#if( $oneUser ) / $userFirstName $userLastName#end
94 {{id name="top"/}}
95 (((#if( !$oneYear )
96 #foreach( $year in $yearList )
97 #if( $velocityCount > 1 ) | #end[[$year>>$doc||anchor=$year]]#end
98 #end)))
99 #set( $eventsNo = 0 )
100 #foreach( $year in $yearList )
101 #set( $eventYearNo = 0 )
102 #if( $oneUser )
103 #set( $sql = ", BaseObject as obj, DateProperty as prop, LargeStringProperty as prop1, LargeStringProperty as prop2, LargeStringProperty as prop3, LargeStringProperty as prop4, LargeStringProperty as prop5, LargeStringProperty as prop6, LargeStringProperty as prop7, LargeStringProperty as prop8
104 where obj.name = doc.fullName and obj.className = '$objectSpace.$objectClass' and obj.name <> '$objectSpace.$objectTemplate' and prop.id.id = obj.id and prop1.id.id = obj.id and prop2.id.id = obj.id and prop3.id.id = obj.id and prop4.id.id = obj.id and prop5.id.id = obj.id and prop6.id.id = obj.id and prop7.id.id = obj.id and prop8.id.id = obj.id and prop.name = 'end_date' and prop1.name = 'general_chair' and prop2.name = 'program_chair' and prop2.name = 'program_chair' and prop3.name = 'organising_chair' and prop4.name = 'pc_member' and prop5.name = 'spc_member' and prop6.name = 'organiser' and prop7.name = 'lecturer' and prop8.name = 'other_role_player_1' and year(prop.value) = $year and (prop1.value like '%$selectedUser%' or prop2.value like '%$selectedUser%' or prop3.value like '%$selectedUser%' or prop4.value like '%$selectedUser%' or prop5.value like '%$selectedUser%' or prop6.value like '%$selectedUser%' or prop7.value like '%$selectedUser%' or prop8.value like '%$selectedUser%' ) order by prop.value desc" )
105 #else
106 #set ($sql = ", BaseObject as obj, DateProperty as prop
107 where obj.name = doc.fullName and obj.className = '$objectSpace.$objectClass' and obj.name <> '$objectSpace.$objectTemplate' and prop.id.id = obj.id and prop.name = 'year' and year(prop.value) = $year
108 order by prop.value desc" )
109 #end
110 ##
111 #set( $eventsFound = $xwiki.searchDocuments($sql) )
112 #set( $eventsYearNo = $eventsFound.size() )
113 #if( $eventsYearNo > 0 )
114 #set( $eventsNo = $eventsNo + $eventsYearNo )
115 #if( !$oneYear )
116 (% style="border-style:solid hidden hidden solid; border-color:$theme.borderColor; text-align:left; font-style:oblique" %)|{{id name='$year'/}}[[$year>>$doc.name||queryString='year=$year']]
117 #end
118 #foreach( $event in $eventsFound )
119 * {{event}}$event{{/event}}
120 #end
121 #if( !$oneYear )
122 (% style="border-style:hidden solid solid hidden; border-color:$theme.borderColor; text-align:right; font-style:oblique; font-weight:normal; font-size:smaller; color:$theme.textSecondaryColor" %)|($eventsYearNo #if($eventsYearNo == 1){{stringEngIta eng='event in' ita='evento nel'/}}#else{{stringEngIta eng='events in' ita='eventi nel'/}}#end $year{{id name='$year-bottom'/}}) [[[{{stringEngIta eng='top' ita='in cima'/}}]>>||anchor="top"]] [[[{{stringEngIta eng='bottom' ita='in fondo'/}}]>>||anchor="bottom"]]
123 #end
124 #end
125 #end
126 #if( $eventsNo > 0 )
127 (% style="text-align:right; font-style:oblique; font-weight:normal; font-size:smaller; color:$theme.textSecondaryColor; border-color:$theme.borderColor; border-bottom-style:dotted" %)|($eventsNo #if($thesisNo == 1){{stringEngIta eng='event' ita='evento'/}}#else{{stringEngIta eng='events' ita='eventi'/}}#end#if( $oneYear ) {{stringEngIta eng='in' ita='nel'/}} $selectedYear#else {{stringEngIta eng='from' ita='dal'/}} $firstYear {{stringEngIta eng='to' ita='al'/}} $lastYear#end)
128 #end
129 {{/velocity}}

Partita IVA: 01131710376 - Copyright © 2008-2022 APICe@DISI Research Group - PRIVACY