Changes for page Per Status

From version 91.1
edited by Andrea Omicini
on 22/06/2023 13:09
Change comment: There is no comment for this version
To version 90.1
edited by Andrea Omicini
on 22/06/2023 13:01
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -35,7 +35,6 @@
35 35  ## $oneStatus false gets a list of statuses, true just one
36 36  #set( $oneStatus = false )
37 37  #set( $showRejected = false )
38 -#set( $showPublished = false )
39 39  ## $statusList gets the list of statuses to be shown
40 40  #set( $statusList = $publicationStatuses )
41 41  ##
... ... @@ -43,18 +43,12 @@
43 43  #if( $statusPar.toLowerCase() == "all" )
44 44  ## 'all' value gets all unpublished papers including "Rejected" ones
45 45   #set( $showRejected = true )
46 -#elseif( $statusPar.toLowerCase() == "published" )
47 - #set( $oneStatus = true )
48 - #set( $statusList = ["published"] )
49 - #set( $showPublished = true )
50 -#elseif( $statusPar.toLowerCase() == "rejected" )
51 - #set( $oneStatus = true )
52 - #set( $statusList = ["rejected"] )
53 - #set( $showRejected = true )
54 -#elseif( $publicationStatuses.contains($statusPar) )
55 -## 'status' parameter is an admissible publication status value
45 +#else
46 + #if( $publicationStatuses.contains($statusPar) )
47 + ## 'status' parameter is an admissible publication status value
56 56   #set( $oneStatus = true )
57 57   #set( $statusList = [$statusPar] )
50 + #end
58 58  #end
59 59  ##
60 60  ## HANDLE STATUS / END
... ... @@ -115,7 +115,6 @@
115 115  #set( $itemNo = 0 )
116 116  ## cycle over statuses
117 117  #foreach( $status in $statusList )
118 - #if( $status != "published" && $status != "rejected" || $status == "published" && $showPublished || $status == "rejected" && $showRejected )
119 119   #set( $query = ", BaseObject as obj, #if( $oneUser ) LargeStringProperty as propAuthor, LargeStringProperty as propEditor, #end StringProperty as propStatus #if( !$hasEdit ), StringProperty as propAccess #end
120 120   where obj.name = doc.fullName and obj.className = '${objectSpace}.${objectClass}' and obj.name <> '${objectPool}.${objectTemplate}' #if( $oneUser ) and propAuthor.id.id = obj.id and propEditor.id.id = obj.id and propAuthor.name = 'author' and propEditor.name = 'editor' and ( propAuthor.value like '$userString' or ( propAuthor.value = '' and propEditor.value like '$userString' ) ) #end and propStatus.id.id = obj.id and propStatus.name = 'status' and propStatus.value = '$status' #if( !$hasEdit ) and propAccess.id.id = obj.id and propAccess.name = 'access' and propAccess.value <> 'hidden' #end" )
121 121   #set( $itemFound = $xwiki.searchDocuments($query) )
... ... @@ -126,6 +126,7 @@
126 126   #set( $itemNo = $itemNo + $itemStatusNo )
127 127   #end
128 128  #end
121 +$itemStatusNo
129 129  ##
130 130  ## output results
131 131  ## page subtitle