Changes for page Per Year
From version 39.2
edited by Andrea Omicini
on 25/10/2021 20:35
on 25/10/2021 20:35
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
-
... ... @@ -30,6 +30,7 @@ 30 30 #set( $userNamePar = $request.user.trim() ) 31 31 ## default values 32 32 #set( $oneUser = false ) 33 +#set( $oneRole = false ) 33 33 #set( $userFirstName = "" ) 34 34 #set( $userLastName = "" ) 35 35 #if( $userName || $userNamePar ) ... ... @@ -50,7 +50,6 @@ 50 50 #end 51 51 ##user selected and existing user page 52 52 #set( $rolePar = $request.role.trim().toLowerCase() ) 53 - #set( $oneRole = false ) 54 54 #set( $selectedRole = '' ) 55 55 #if( $rolePar != '' && $allThesisRoles.contains($rolePar) ) 56 56 #set( $oneRole = true ) ... ... @@ -64,24 +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**#if( $oneRole ) / $selectedRole#end#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'/}} 68 +## index 69 +#if( !$oneStatus ) 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'/}} 69 69 ## search theses 75 +#set( $thesisNo = 0 ) 70 70 #foreach( $status in $allThesisStatuses ) 71 71 #if( !$oneStatus || $selectedStatus == $status ) 72 -#if( !$oneSort ) 73 -(% style="font-size: smaller; padding:1em 1.5em 0.25em 1.5em; background-color:$theme.highlightColor" %)(((#foreach( $sort in $sortList )#if ($velocityCount > 1) | #end [[{{pubSort plural="true" uppercase="false"}}$sort{{/pubSort}}>>||anchor="$sort"]]#end))) 74 -#elseif( !$oneYear ) 75 -(% 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))) 76 -#end 77 - 78 - 79 -= $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 80 80 ## some selected status or all statuses / now $status 81 81 #if( $oneUser ) 82 82 == $selectedUser == 83 83 ## some user selected 84 84 #foreach( $role in $allThesisRoles ) 87 + #set( $thesisStatusRoleNo = 0 ) 85 85 #if( !$oneRole || $selectedRole == $role ) 86 86 #if( $role == "contact" ) 87 87 #set( $selectedRoleFieldName = "contact" ) ... ... @@ -95,10 +95,13 @@ 95 95 #set ($sql = ", BaseObject as obj, StringProperty as prop0, LargeStringProperty as prop1, DateProperty as prop2 96 96 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" ) 97 97 #set( $thesisFound = $xwiki.searchDocuments($sql) ) 101 + #set( $thesisFoundNo = $thesisFound.size() ) 102 + #set( $thesisStatusRoleNo = $thesisStatusRoleNo + $thesisFoundNo ) 98 98 #foreach( $thesis in $thesisFound ) 99 99 * $thesis 100 100 #end 101 101 #end 107 + #set( $thesisStatusNo = $thesisStatusNo + $thesisStatusRoleNo ) 102 102 #end 103 103 ## no user selected, no role selected 104 104 #else ... ... @@ -105,14 +105,18 @@ 105 105 #set ($sql = ", BaseObject as obj, StringProperty as prop0, DateProperty as prop1 106 106 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" ) 107 107 #set( $thesisFound = $xwiki.searchDocuments($sql) ) 114 + #set( $thesisFoundNo = $thesisFound.size() ) 115 + #set( $thesisStatusNo = $thesisStatusNo + $thesisFoundNo ) 108 108 #foreach( $thesis in $thesisFound ) 109 109 * $thesis 110 110 #end 111 111 #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 112 112 #end 113 113 ## 114 114 ## #set( $thesisFound = $xwiki.searchDocuments($sql) ) 115 -## #set( $thesisFoundNo = $thesisFound.size() ) 116 116 ## #set($thesisDoc = $xwiki.getDocument($thesis)) 117 117 ## #set($thesisObj = $thesisDoc.getObject('Theses.ThesisClass')) 118 118 ##* [[$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