Changes for page Per A.Y.
From version 48.6
edited by Andrea Omicini
on 20/07/2023 10:33
on 20/07/2023 10:33
Change comment:
There is no comment for this version
To version 52.3
edited by Andrea Omicini
on 31/08/2023 12:08
on 31/08/2023 12:08
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,6 +1,8 @@ 1 1 {{velocity}} 2 2 {{html clean="false" wiki="true"}} 3 3 #template('apice_macros.vm') 4 +#nodoclang() 5 +#nolangpar() 4 4 #setobjectspace("Courses") 5 5 #template('apice_course_macros.vm') 6 6 #template('apice_user_param.vm') ... ... @@ -15,10 +15,10 @@ 15 15 #stop 16 16 #end 17 17 #if( $personalCourseDoc.maxYears && $personalCourseDoc.maxYears != "" ) 18 - #set( $maxCourseYears = $personalCourseDoc.display('maxYears','view') ) 20 + #set( $maxCourseYears = $numbertool.toNumber($personalCourseDoc.display('maxYears','view')) ) 19 19 #end 20 20 #if( $personalCourseDoc.firstYear && $personalCourseDoc.firstYear != "" ) 21 - #set( $firstYearCourse = $personalCourseDoc.display('firstYear','view') ) 23 + #set( $firstYearCourse = $numbertool.toNumber($personalCourseDoc.display('firstYear','view')) ) 22 22 #end 23 23 #if( $personalCourseDoc.lastYear && $personalCourseDoc.lastYear != "" ) 24 24 #set( $lastYearCourse = $numbertool.toNumber($personalCourseDoc.display('lastYear','view')) ) ... ... @@ -25,8 +25,8 @@ 25 25 #end 26 26 #end 27 27 ## years / parameters takes precedence 28 -#set( $firstYear = $firstYearCourse ) 29 -#set( $lastYear = $lastYearCourse ) 30 +#set( $firstYear = $numbertool.toNumber($firstYearCourse) ) 31 +#set( $lastYear = $numbertool.toNumber($lastYearCourse) ) 30 30 #template('apice_year_param.vm') 31 31 ## 32 32 ## DATA STRUCTURES / START ... ... @@ -33,11 +33,11 @@ 33 33 #set( $itemMap = {} ) 34 34 #set( $itemNo = 0 ) 35 35 ## cycle over years 36 -#foreach( $year in $yearList) 38 +#foreach( $year in $yearList ) 37 37 #set( $year1 = $year + 1 ) 38 38 #set( $ayear = $year + "/" + $year1 ) 39 - #set( $query = ", BaseObject as objCourse, StringProperty as propYear, LargeStringProperty as propProfessor, LargeStringProperty as propOtherprofessors, LargeStringProperty as propTutors 40 - where objCourse.name = doc.fullName and objCourse.className = '${mainSpace}.Class' and objCourse.name <> '${objectPool}.Template' and propYear.id.id = objCourse.id and propProfessor.id.id = objCourse.id and propOtherprofessors.id.id = objCourse.id and propTutors.id.id = objCourse.id and propYear.name = 'ay' and propProfessor.name = 'professor' and propOtherprofessors.name = 'otherProfessors' and propTutors.name = 'tutors' and propYear.value = '$ayear' #if( $oneUser )and ( propProfessor.value like '%$userName%' or propOtherprofessors.value like '%$userName%' or propTutors.value like '%$userName%' )#end ") 41 + #set( $query = ", BaseObject as objCourse, StringProperty as propName, StringProperty as propYear, LargeStringProperty as propProfessor, LargeStringProperty as propOtherprofessors, LargeStringProperty as propTutors 42 + where objCourse.name = doc.fullName and objCourse.className = '${mainSpace}.Class' and objCourse.name <> '${objectPool}.Template' and propName.id.id = objCourse.id and propYear.id.id = objCourse.id and propProfessor.id.id = objCourse.id and propOtherprofessors.id.id = objCourse.id and propTutors.id.id = objCourse.id and propName.name = #if( $services.localization.currentLocale == 'it' )'ita'#{else}'eng'#end and propYear.name = 'ay' and propProfessor.name = 'professor' and propOtherprofessors.name = 'otherProfessors' and propTutors.name = 'tutors' and propYear.value = '$ayear' #if( $oneUser )and ( propProfessor.value like '%$userName%' or propOtherprofessors.value like '%$userName%' or propTutors.value like '%$userName%' )#end order by propName.value asc") 41 41 ## execute query 42 42 #set( $itemFound = $xwiki.searchDocuments($query) ) 43 43 ## set counters ... ... @@ -108,11 +108,18 @@ 108 108 ## year top / end 109 109 ## 110 110 ## year display / start 111 -<div style= "font-style:normal"><ul>113 + <div class='menumainbody' style='margin-top: .25em'> 112 112 #foreach( $item in $itemMap[$year] ) 113 -<li>{{course}}$item{{/course}}</li> 115 + #if( $oneUser) 116 + #coursename($item) (#coursecycle($item)) 117 + #else 118 + #courseicon #coursename($item) <span class='textsecondary'>(#coursecycle($item)) — </span>#courseprofessor($item)<br/> 119 + #end 120 +## #if( !$foreach.last ) 121 +##  •  122 +## #end 114 114 #end 115 -</ ul></div>124 + </div> 116 116 ## year display / end 117 117 ## 118 118 ## year bottom / start