Changes for page Per Year
From version 39.3
edited by Andrea Omicini
on 25/10/2021 20:39
on 25/10/2021 20:39
Change comment:
There is no comment for this version
To version 44.1
edited by Andrea Omicini
on 25/10/2021 21:09
on 25/10/2021 21:09
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -64,25 +64,27 @@ 64 64 ## if $oneUser is false, $oneRole means nothing -- so all users, all roles / just status 65 65 ## 66 66 ## title 67 ->#if( $oneStatus ){{thesisStatus plural='yes' uppercase='yes'}}$selectedStatus{{/thesisStatus}}#else{{stringEngIta eng="Theses" ita="Tesi"/}}#end#if( $oneUser ) / $userFirstName **$userLastName**#end#if( $oneRole ) / $selectedRole#end 68 - 67 +>#if( $oneStatus ){{thesisStatus plural='yes' uppercase='yes'}}$selectedStatus{{/thesisStatus}}#else{{stringEngIta eng="Theses" ita="Tesi"/}}#end#if( $oneUser ) / $userFirstName **$userLastName**#end#if( $oneRole ) / $selectedRole#end{{id name='top'/}} 69 69 ## index 70 70 #if( !$oneStatus ) 71 -(% style="font-size: smaller; padding:1em 1.5em 0.25em 1.5em; background-color:$theme.highlightColor" %)(((#foreach( $status in $allThesisStatuses )#if ($velocityCount > 1) | #end [[{{thesisStatus plural="true" uppercase="false"}}$status{{/thesisStatus}}>>||anchor="$sort"]]#end))) 72 -#elseif( !$oneYear ) 73 -(% style="font-size: smaller; padding:1em 1.5em 0.25em 1.5em; background-color:$theme.highlightColor" %)(((#foreach( $year in $yearList )#if ($velocityCount > 1) | #end [[$year>>||anchor="$year"]]#end))) 74 -#end 75 - 76 - 70 +(% style="font-size: smaller; padding:1em 1.5em 0.25em 1.5em; background-color:$theme.highlightColor" %)(((#foreach( $status in $allThesisStatuses )#if ($velocityCount > 1) | #end[[{{thesisStatus plural="true" uppercase="false"}}$status{{/thesisStatus}}>>||anchor="$status"]]#end))) 71 +#elseif( !$oneRole ) 72 +(% style="font-size: smaller; padding:1em 1.5em 0.25em 1.5em; background-color:$theme.highlightColor" %)(((#foreach( $role in $allThesisRoles )#if ($velocityCount > 1) | #end [[$role>>||anchor="$role"]]#end))) 73 +#end{{id name='index'/}} 77 77 ## search theses 75 +#set( $thesisNo = 0 ) 78 78 #foreach( $status in $allThesisStatuses ) 79 79 #if( !$oneStatus || $selectedStatus == $status ) 80 -= $status = 78 + #set( $thesisStatusNo = 0 ) 79 + #if( !$oneStatus ) 80 +(% style="border-style:solid hidden hidden solid; border-color:$theme.borderColor; text-align:left; font-style:oblique" %)|{{id name='$status'/}}{{thesisStatus plural='true' uppercase='true' short='true'}}$status{{/thesisStatus}} 81 + #end 81 81 ## some selected status or all statuses / now $status 82 82 #if( $oneUser ) 83 83 == $selectedUser == 84 84 ## some user selected 85 85 #foreach( $role in $allThesisRoles ) 87 + #set( $thesisStatusRoleNo = 0 ) 86 86 #if( !$oneRole || $selectedRole == $role ) 87 87 #if( $role == "contact" ) 88 88 #set( $selectedRoleFieldName = "contact" ) ... ... @@ -96,10 +96,13 @@ 96 96 #set ($sql = ", BaseObject as obj, StringProperty as prop0, LargeStringProperty as prop1, DateProperty as prop2 97 97 where obj.name = doc.fullName and obj.className = 'Theses.ThesisClass' and obj.name <> 'Theses.ThesisClassTemplate' and obj.name <> 'Theses.ThesisTemplate' and prop0.id.id = obj.id and prop1.id.id = obj.id and prop2.id.id = obj.id and prop0.name = 'status' and prop1.name = '$selectedRoleFieldName' and prop2.name = '$orderingDateFieldName' and lower(prop0.value) = '$status' and prop1.value like '%$selectedUser%' order by prop2.value desc" ) 98 98 #set( $thesisFound = $xwiki.searchDocuments($sql) ) 101 + #set( $thesisFoundNo = $thesisFound.size() ) 102 + #set( $thesisStatusRoleNo = $thesisStatusRoleNo + $thesisFoundNo ) 99 99 #foreach( $thesis in $thesisFound ) 100 100 * $thesis 101 101 #end 102 102 #end 107 + #set( $thesisStatusNo = $thesisStatusNo + $thesisStatusRoleNo ) 103 103 #end 104 104 ## no user selected, no role selected 105 105 #else ... ... @@ -106,14 +106,18 @@ 106 106 #set ($sql = ", BaseObject as obj, StringProperty as prop0, DateProperty as prop1 107 107 where obj.name = doc.fullName and obj.className = 'Theses.ThesisClass' and obj.name <> 'Theses.ThesisClassTemplate' and obj.name <> 'Theses.ThesisTemplate' and prop0.id.id = obj.id and prop1.id.id = obj.id and prop0.name = 'status' and prop1.name = '$orderingDateFieldName' and lower(prop0.value) = '$status' order by prop1.value desc" ) 108 108 #set( $thesisFound = $xwiki.searchDocuments($sql) ) 114 + #set( $thesisFoundNo = $thesisFound.size() ) 115 + #set( $thesisStatusNo = $thesisStatusNo + $thesisFoundNo ) 109 109 #foreach( $thesis in $thesisFound ) 110 110 * $thesis 111 111 #end 112 112 #end 120 + #if( !$oneStatus ) 121 +(% style="border-style:hidden solid solid hidden; border-color:$theme.borderColor; text-align:left; font-style:oblique" %)|{{id name='$status'/}}$thesisStatusNo {{thesisStatus plural='true' uppercase='true' short='true'}}$status{{/thesisStatus}} 122 + #end 113 113 #end 114 114 ## 115 115 ## #set( $thesisFound = $xwiki.searchDocuments($sql) ) 116 -## #set( $thesisFoundNo = $thesisFound.size() ) 117 117 ## #set($thesisDoc = $xwiki.getDocument($thesis)) 118 118 ## #set($thesisObj = $thesisDoc.getObject('Theses.ThesisClass')) 119 119 ##* [[$thesisObj.title>>$thesisDoc]] #if( $thesisDoc.getValue('studentUserName') != "" )//$thesisDoc.getValue('studentUserName')//#elseif( $thesisObj.studentFirstName != "" && $thesisObj.studentLastName != "" )//$thesisObj.studentFirstName $thesisObj.studentLastName//#end#if( $thesisObj.endDate != "" ) ($thesisObj.endDate)#end