Modifiche per il documento Per stato
Dalla versione 77.1
modificato da Andrea Omicini
il 03/01/2023 00:07
il 03/01/2023 00:07
Cambia il commento:
Nessun commento per questa versione
Alla versione 82.1
modificato da Andrea Omicini
il 03/01/2023 00:13
il 03/01/2023 00:13
Cambia il commento:
Nessun commento per questa versione
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -81,7 +81,6 @@ 81 81 #set( $statusList = [$statusPar] ) 82 82 #end 83 83 #end 84 -$statusList 85 85 ## 86 86 ## query to structures 87 87 #set( $pubMap = {} ) ... ... @@ -88,15 +88,16 @@ 88 88 #set( $pubNo = 0 ) 89 89 #foreach( $status in $statusList ) 90 90 #set( $from = ", BaseObject as obj, LargeStringProperty as prop0, LargeStringProperty as prop1, StringProperty as prop2" ) 91 - #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 = 90 + #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'" ) 92 92 #set( $sql = $from + " where " + $where ) 93 93 #set( $pubFound = $xwiki.searchDocuments($sql) ) 94 -$pubFound.size() 93 + #set( $pubStatusNo = $pubFound.size() ) 95 95 #if( $pubStatusNo > 0 ) 96 96 #set( $pubMap[$status] = $pubFound ) 97 97 #set( $pubNo = $pubNo + $pubStatusNo ) 98 98 #end 99 99 #end 99 +$pubMap 100 100 ## output results 101 101 ## page subtitle 102 102 {{id name="top"/}} ... ... @@ -111,7 +111,7 @@ 111 111 #if( $pubMap.keySet().size() > 1 ) 112 112 ## found more than one status 113 113 {{id name="index"/}} 114 -(% style="font-size:smaller; text-align:right; padding:1em 1.5em 0.25em 1.5em; background-color:$theme.highlightColor" %)(((#foreach( $status in $pubMap.keySet() )#if( !$foreach.first ) | #end[[ ${pubStatus uppercase='false' plural='true'}}$statusPar{{/pubStatus}}>>||anchor="$status"]]#end)))114 +(% style="font-size:smaller; text-align:right; padding:1em 1.5em 0.25em 1.5em; background-color:$theme.highlightColor" %)(((#foreach( $status in $pubMap.keySet() )#if( !$foreach.first ) | #end[[{{pubStatus uppercase='false' plural='true'}}$status{{/pubStatus}}>>||anchor="$status"]]#end))) 115 115 #end 116 116 117 117