Changes for page Per A.Y.

From version 16.1
edited by Andrea Omicini
on 22/11/2021 00:56
Change comment: There is no comment for this version
To version 23.1
edited by Andrea Omicini
on 22/11/2021 01:24
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -58,6 +58,9 @@
58 58   #set( $tutorFirstName = "" )
59 59   #set( $tutorLastName = "" )
60 60  #end
61 +## professor takes precedence over tutor
62 +#if( $professorName != "" )#set( $tutorName = "" )#end
63 +## user takes precedence over both professor and tutor and gets them all
61 61  #if( $userName != "" )#set( $professorName = $userName )#set( $tutorName = $userName )#end
62 62  ##
63 63  #if( $firstYearCou )#set( $firstYear = $firstYearCou )#end
... ... @@ -99,12 +99,13 @@
99 99   #end
100 100  #end
101 101  
102 ->{{stringEngIta eng = "Courses" ita = "Corsi"/}} / **#if( $oneYear )$aYear#else$firstAYear–$lastAYear#end**#if( $userName != "" ) / $userFirstName $userLastName#elseif( $professorName != "" ) / $professorFirstName $professorLastName#elseif( $tutorName != "" ) / $tutorFirstName $tutorLastName (tutor)#end{{id name="top"/}}
105 +>{{stringEngIta eng = "Courses" ita = "Corsi"/}} / **#if( $oneYear )$aYear#else$firstAYear****$lastAYear#end**#if( $userName != "" ) / $userFirstName $userLastName#elseif( $professorName != "" ) / $professorFirstName $professorLastName#elseif( $tutorName != "" ) / $tutorFirstName $tutorLastName (tutor)#end{{id name="top"/}}
103 103  ##
104 104  #if( !$oneYear )
105 105  (% style="font-size: smaller; padding:1em 1.5em 0.25em 1.5em; background-color:$theme.highlightColor" %)(((#foreach ($yearr in $yearList)#set($yearr1 = $yearr + 1)#set($ayearr = "$yearr/$yearr1")#if( $velocityCount > 1 ) | #end[[$ayearr>>$doc||anchor=$ayearr]]#end)))
106 106  #end
107 107  ##
111 +#set( $courseNo = 0 )
108 108  #foreach( $yearr in $yearList)#set($yearr1 = $yearr + 1)#set($ayearr = $yearr + "/" + $yearr1 )
109 109   #set ($sql = ", BaseObject as obj, StringProperty as prop, LargeStringProperty as prop1, LargeStringProperty as prop2, LargeStringProperty as prop3
110 110   where obj.name = doc.fullName and obj.className = 'Courses.CourseClass' and obj.name <> 'Courses.CourseTemplate' 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 prop.name = 'aY' and prop1.name = 'professor' and prop2.name = 'otherProfessors' and prop3.name = 'tutors' and prop.value like '%$yearr%' and ( prop1.value like '%$professorName%' or prop2.value like '%$professorName%' or prop3.value like '%$tutorName%' ) order by prop.value desc ")
... ... @@ -111,15 +111,17 @@
111 111   #set( $courseFound = $xwiki.searchDocuments($sql) )
112 112   #set( $courseYearNo = $courseFound.size() )
113 113   #if( $$courseYearNo >0 )
114 - #if(!$oneYear)
115 -
116 -=== $ayearr ===
117 -{{id name="$ayearr"/}}
118 -#end#foreach ($courseDoc in $courseFound)
119 - #set( $name = $xwiki.getDocument($courseDoc).display("courseName"))
120 - #set( $nome = $xwiki.getDocument($courseDoc).display("nomeCorso"))
118 + #set( $courseNo = $courseNo + $courseYearNo )
119 + #if( !$oneYear )
120 +(% style="border-style:solid hidden hidden solid; border-color:$theme.borderColor; text-align:left; font-style:oblique" %)|{{id name='$yearr'/}}[[$ayearr>>$doc||queryString='year=$yearr#if( $userName != "" )&user=$userName#elseif( $professorName != "" )&professor=$professorName#elseif( $tutorName != "" )&tutor=$tutorName#end']]
121 + #end
122 + #foreach( $courseDoc in $courseFound )
123 + #set( $name = $xwiki.getDocument($courseDoc).display("courseName"))
124 + #set( $nome = $xwiki.getDocument($courseDoc).display("nomeCorso"))
121 121  * [[#if( $nome == "" )$name#elseif( $name == "" )$nome#elseif( $context.language.contains('it') )$nome#else$name#end>>$courseDoc]]
126 + #end
127 +(% style="#if( !$oneYear )border-style:hidden solid solid hidden; border-color:$theme.borderColor;#end text-align:right; font-style:oblique; font-size:smaller" %)|($courseYearNo #if( $courseYearNo == 1 ){{stringEngIta eng='course in' ita='corso nel'/}}#else{{stringEngIta eng='courses in' ita='corsi nel'/}}#end $ayearr) [[[{{stringEngIta eng='top' ita='in cima'/}}]>>||anchor="top"]] [[[{{stringEngIta eng='bottom' ita='in fondo'/}}]>>||anchor="bottom"]]
128 + #end
122 122  #end
123 -(% style='font-style:oblique;font-size:smaller;text-align:right;color:gray;margin-top:-0.5em;margin-bottom:0em' %)((( ($courseFound.size() #if( $courseFound.size() > 1 ){{stringEngIta ita="corsi" eng="courses"/}}#else{{stringEngIta ita="corso" eng="course"/}}#end / $ayearr) [[[top]>>||anchor="top"]] )))(%%)
124 -#end#end
130 +#if( !$oneYear )(% style="text-align:right; font-style:oblique; font-size:smaller" %)|($courseNo #if( $courseNo == 1 ){{stringEngIta eng='course' ita='corso'/}}#else{{stringEngIta eng='courses' ita='corsi'/}}#end)#end
125 125  {{/velocity}}