Changes for page Per A.Y.

From version 51.15
edited by Andrea Omicini
on 27/08/2023 18:52
Change comment: There is no comment for this version
To version 48.4
edited by Andrea Omicini
on 20/07/2023 10:28
Change comment: There is no comment for this version

Summary

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 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")
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
... ... @@ -67,8 +67,8 @@
67 67   $ayear
68 68  #else
69 69   #set( $firstYear1 = $firstYear + 1 )
70 - #set( $lastYear1 = $lastYear + 1 )
71 71   #set( $aFirstYear = $firstYear + "/" + $firstYear1 )
69 + #set( $lastYear1 = $lastYear + 1 )
72 72   #set( $aLastYear = $lastYear + "/" + $lastYear1 )
73 73   $aFirstYear<span class="textsecondary">&ensp;&mdash;&ensp;</span>$aLastYear
74 74  #end
... ... @@ -110,17 +110,11 @@
110 110  ## year top / end
111 111  ##
112 112  ## year display / start
113 - <div class='menumainbody' style='margin-top: .25em'>
111 +<div style="font-style: normal"><ul>
114 114   #foreach( $item in $itemMap[$year] )
115 - #if( $oneUser)
116 - #coursename($item)&ensp;(#coursecycle($item))
117 - #else
118 - #coursename($item)&ensp;<span class='textsecondary'>(#coursecycle($item)) &mdash; </span>#courseprofessor($item)
119 - #end
120 - #if( !$foreach.last )
121 - &ensp;&bull;&ensp;
122 - #end
113 +<li>{{course}}$item{{/course}}</li>
123 123   #end
115 +</ul></div>
124 124  ## year display / end
125 125  ##
126 126  ## year bottom / start