Changes for page Per A.Y.
From version 51.15
edited by Andrea Omicini
on 27/08/2023 18:52
on 27/08/2023 18:52
Change comment:
There is no comment for this version
To version 48.3
edited by Andrea Omicini
on 20/07/2023 10:26
on 20/07/2023 10:26
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,8 +1,6 @@ 1 1 {{velocity}} 2 2 {{html clean="false" wiki="true"}} 3 3 #template('apice_macros.vm') 4 -#nodoclang() 5 -#nolangpar() 6 6 #setobjectspace("Courses") 7 7 #template('apice_course_macros.vm') 8 8 #template('apice_user_param.vm') ... ... @@ -17,18 +17,18 @@ 17 17 #stop 18 18 #end 19 19 #if( $personalCourseDoc.maxYears && $personalCourseDoc.maxYears != "" ) 20 - #set( $maxCourseYears = $ numbertool.toNumber($personalCourseDoc.display('maxYears','view')))18 + #set( $maxCourseYears = $personalCourseDoc.display('maxYears','view') ) 21 21 #end 22 22 #if( $personalCourseDoc.firstYear && $personalCourseDoc.firstYear != "" ) 23 - #set( $firstYearCourse = $ numbertool.toNumber($personalCourseDoc.display('firstYear','view')))21 + #set( $firstYearCourse = $personalCourseDoc.display('firstYear','view') ) 24 24 #end 25 25 #if( $personalCourseDoc.lastYear && $personalCourseDoc.lastYear != "" ) 26 - #set( $lastYearCourse = $ numbertool.toNumber($personalCourseDoc.display('lastYear','view')))24 + #set( $lastYearCourse = $personalCourseDoc.display('lastYear','view') ) 27 27 #end 28 28 #end 29 29 ## years / parameters takes precedence 30 -#set( $firstYear = $ numbertool.toNumber($firstYearCourse))31 -#set( $lastYear = $ numbertool.toNumber($lastYearCourse))28 +#set( $firstYear = $firstYearCourse ) 29 +#set( $lastYear = $lastYearCourse ) 32 32 #template('apice_year_param.vm') 33 33 ## 34 34 ## DATA STRUCTURES / START ... ... @@ -35,11 +35,11 @@ 35 35 #set( $itemMap = {} ) 36 36 #set( $itemNo = 0 ) 37 37 ## cycle over years 38 -#foreach( $year in $yearList 36 +#foreach( $year in $yearList) 39 39 #set( $year1 = $year + 1 ) 40 40 #set( $ayear = $year + "/" + $year1 ) 41 - #set( $query = ", BaseObject as objCourse, StringProperty as prop Name, StringProperty as propYear, LargeStringProperty as propProfessor, LargeStringProperty as propOtherprofessors, LargeStringProperty as propTutors42 - where objCourse.name = doc.fullName and objCourse.className = '${mainSpace}.Class' and objCourse.name <> '${objectPool}.Template' and prop Name.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%' )#endorder by propName.value asc")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 ") 43 43 ## execute query 44 44 #set( $itemFound = $xwiki.searchDocuments($query) ) 45 45 ## set counters ... ... @@ -66,11 +66,7 @@ 66 66 #set( $ayear = $year + "/" + $year1 ) 67 67 $ayear 68 68 #else 69 - #set( $firstYear1 = $firstYear + 1 ) 70 - #set( $lastYear1 = $lastYear + 1 ) 71 - #set( $aFirstYear = $firstYear + "/" + $firstYear1 ) 72 - #set( $aLastYear = $lastYear + "/" + $lastYear1 ) 73 - $aFirstYear<span class="textsecondary"> — </span>$aLastYear 67 + $firstYear–$lastYear 74 74 #end 75 75 #if( $oneUser ) 76 76 <span class="textsecondary"> / </span> ... ... @@ -110,17 +110,11 @@ 110 110 ## year top / end 111 111 ## 112 112 ## year display / start 113 - class='menumainbody' style='margin-top:.25em'>107 +<div style="font-style: normal"><ul> 114 114 #foreach( $item in $itemMap[$year] ) 115 - #if( $oneUser) 116 - #coursename($item) (#coursecycle($item)) 117 - #else 118 - #coursename($item) <span class='textsecondary'>(#coursecycle($item)) — </span>#courseprofessor($item) 119 - #end 120 - #if( !$foreach.last ) 121 -  •  122 - #end 109 +<li>{{course}}$item{{/course}}</li> 123 123 #end 111 +</ul></div> 124 124 ## year display / end 125 125 ## 126 126 ## year bottom / start