Modifiche per il documento Per stato
Dalla versione 70.1
modificato da Andrea Omicini
il 02/01/2023 16:28
il 02/01/2023 16:28
Cambia il commento:
Nessun commento per questa versione
Alla versione 68.1
modificato da Andrea Omicini
il 31/12/2022 02:23
il 31/12/2022 02:23
Cambia il commento:
Nessun commento per questa versione
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -9,7 +9,7 @@ 9 9 #set( $firstNamePar = $request.name.trim() ) 10 10 #set( $lastNamePar = $request.surname.trim() ) 11 11 ## which status 12 -#set( 12 +#set($statusPar = $request.status.trim()) 13 13 ## 14 14 #### handle who 15 15 #if( $userName ) ... ... @@ -68,17 +68,16 @@ 68 68 ## $oneStatus false gets a list of statuses, true just one 69 69 #set( $oneStatus = false ) 70 70 ## $statusList gets the list of statuses to be shown 71 -#set( $statusList = [] ) 72 72 ## default: all unpublished papers except Rejected ones 73 -#set( $ discard= $statusList.addAll($unpublishedStatuses))72 +#set( $statusList = $statusRangeUnpublished ) 74 74 #if( $statusPar.toLowerCase() == "all" ) 75 75 ## 'all' value gets all unpublished papers including "Rejected" ones 76 - #set( discard= $statusList.add("rejected"))75 + #set($statusList = $statusRangeUnpublishedFull) 77 77 #else 78 - #if( $ allStatusesPlus.contains($statusPar) )77 + #if( $statusRangeFull.contains($statusPar) ) 79 79 ## 'status' parameter is an admissible publication status value 80 - #set( 81 - #set( 79 + #set($oneStatus = true) 80 + #set($statusList = [$statusPar]) 82 82 #end 83 83 #end 84 84 ## ... ... @@ -99,7 +99,7 @@ 99 99 ## 100 100 #foreach( $status in $statusList ) 101 101 #set( $from = ", BaseObject as obj, LargeStringProperty as prop0, LargeStringProperty as prop1, StringProperty as prop2" ) 102 - #set( $where = "obj.name = doc.fullName and obj.className = '${objectSpace}.${objectClass}' and obj.name <> '${objectSpace}.${objectTemplate}' and prop0.id.id = obj.id and prop1.id.id = obj.id and prop2.id.id = obj.id and prop0.name = 'author' and prop1.name = 'editor' and ( prop0.value like '$userString' or ( prop0.value = '' and prop1.value like '$userString' ) )and prop2.name = 'status' and prop2.value = '$status'" )101 + #set( $where = "obj.name = doc.fullName and obj.className = '${objectSpace}.${objectClass}' and obj.name <> '${objectSpace}.${objectTemplate}' and prop0.id.id = obj.id and prop1.id.id = obj.id and prop2.id.id = obj.id and prop0.name = 'author' and prop1.name = 'editor' and ( prop0.value like '$userString' or ( prop0.value = '' and prop1.value like '$userString' ) and prop2.name = 'status' and prop2.value = '$status'" ) 103 103 #set( $sql = $from + " where " + $where ) 104 104 #set( $pubFound = $xwiki.searchDocuments($sql) ) 105 105 #set( $pubStatusNo = $pubFound.size() )