Changes for page Per Year

From version 21.1
edited by Andrea Omicini
on 25/10/2021 17:47
Change comment: There is no comment for this version
To version 26.1
edited by Andrea Omicini
on 25/10/2021 17:53
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -110,30 +110,33 @@
110 110   #if( $selectedStatus == 'all' || $selectedStatus == $status )
111 111  = $status =
112 112  ## some selected status or all statuses / now $status
113 - #if( $userSelected )
113 + #if( $userSelected )
114 114  == $userName ==
115 115  ## some user selected
116 - #if( $roleSelected )
116 + #if( $roleSelected )
117 117  ## some specific role selected
118 118  === $roleSelectedFieldName ===
119 - #set ($sql = ", BaseObject as obj, StringProperty as prop0, LargeStringProperty as prop1, DateProperty as prop2
120 - 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 = '$roleSelectedFieldName' and prop2.name = '$orderingDateFieldName' and prop0.value = '$selectedStatus' and prop1.value like '%$userName%' order by prop2.value desc" )
121 - #else
119 + #set ($sql = ", BaseObject as obj, StringProperty as prop0, LargeStringProperty as prop1, DateProperty as prop2
120 + 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 = '$roleSelectedFieldName' and prop2.name = '$orderingDateFieldName' and lower(prop0.value) = '$status' and prop1.value like '%$userName%' order by prop2.value desc" )
121 + #else
122 122  ## no specific role selected
123 - #set ($sql = ", BaseObject as obj, StringProperty as prop0, LargeStringProperty as prop1, LargeStringProperty as prop2, LargeStringProperty as prop3, DateProperty as prop4
124 - 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 prop3.id.id = obj.id and prop4.id.id = obj.id and prop0.name = 'status' and prop1.name = 'supervisor' and prop2.name = 'coSupervisors' and prop3.name = 'contact' and prop4.name = '$orderingDateFieldName' and lower(prop0.value) = '$selectedStatus' and ( prop1.value like '%$userName%' or prop2.value like '%$userName%' or prop3.value like '%$userName%' ) order by prop4.value desc" )
125 - #end
126 - #else
123 + #set ($sql = ", BaseObject as obj, StringProperty as prop0, LargeStringProperty as prop1, LargeStringProperty as prop2, LargeStringProperty as prop3, DateProperty as prop4
124 + 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 prop3.id.id = obj.id and prop4.id.id = obj.id and prop0.name = 'status' and prop1.name = 'supervisor' and prop2.name = 'coSupervisors' and prop3.name = 'contact' and prop4.name = '$orderingDateFieldName' and lower(prop0.value) = '$status' and ( prop1.value like '%$userName%' or prop2.value like '%$userName%' or prop3.value like '%$userName%' ) order by prop4.value desc" )
125 + #end
126 + #else
127 127  ## no user selected, no role selected
128 - #set ($sql = ", BaseObject as obj, StringProperty as prop0, DateProperty as prop1
129 - 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 prop0.value = '$selectedStatus' order by prop1.value desc" )
128 + #set ($sql = ", BaseObject as obj, StringProperty as prop0, DateProperty as prop1
129 + 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" )
130 + #end
130 130   #end
131 -#end
132 -#set( $thesisFound = $xwiki.searchDocuments($sql) )
133 -#set( $thesisFoundNo = $thesisFound.size() )
132 + $sql
133 + #set( $thesisFound = $xwiki.searchDocuments($sql) )
134 + #set( $thesisFoundNo = $thesisFound.size() )
135 + $thesisFoundNo
134 134  ##
135 -#foreach ($thesis in $thesisFound)#set($thesisDoc = $xwiki.getDocument($thesis))
137 + #foreach ($thesis in $thesisFound)#set($thesisDoc = $xwiki.getDocument($thesis))
136 136  * [[$thesisDoc.getValue("title")>>$thesisDoc]]#thesisTitleLink($thesis)#if( $thesisDoc.getValue("studentUserName") != "" || $thesisDoc.getValue("studentName") != "" || ( $thesisDoc.getValue("studentFirstName") != "" && $thesisDoc.getValue("studentLastName") != "" ) ) //(#thesisAuthorLink($thesis)#if( $thesisDoc.display("endDate") != "" ), #thesisYear($thesis)#end)//#end
137 137  
140 + #end
138 138  #end
139 139  {{/velocity}}