Changes for page Per Status

From version 60.13
edited by Andrea Omicini
on 14/10/2021 01:00
Change comment: There is no comment for this version
To version 62.1
edited by Andrea Omicini
on 16/10/2021 00:59
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -51,38 +51,35 @@
51 51  ##
52 52  {{id name="top"/}}
53 53  #if( $oneAuthor )#if( $oneStatus )
54 -
55 55  >**{{pubStatus uppercase='true' plural='true'}}$statusPar{{/pubStatus}}** / $authorFirstName $authorLastName
56 56  #else
57 -
58 58  >**{{pubStatus uppercase='true' plural='true'}}unpublished{{/pubStatus}}** / $authorFirstName $authorLastName
59 59  #end#elseif($oneStatus)
60 -
61 61  >{{pubStatus uppercase='true' plural='true'}}$statusPar{{/pubStatus}}
62 62  #else
63 -
64 64  >{{pubStatus uppercase='true' plural='true'}}unpublished{{/pubStatus}}
65 65  #end
66 -
62 +##
67 67  #if( !$oneStatus )
68 68  (% style="font-size: smaller; padding:1em 1.5em 0.25em 1.5em; background-color:#if( $xwikiTheme =='dark') #3A3F44 #else whitesmoke #end" %)(((#foreach( $status in $statusList )#if( $velocityCount > 1 ) | #end[[{{pubStatus}}$status{{/pubStatus}}>>||anchor=$status]]#end)))
69 69  #end
70 70  ##
71 -#foreach ($status in $statusList)
72 -#set( $from = ", BaseObject as obj, LargeStringProperty as prop0, StringProperty as prop1" )
73 -#set( $where = "obj.name=doc.fullName and obj.className='Publications.PublicationClass' and obj.name<>'Publications.PublicationClassTemplate' and prop0.id.id=obj.id and prop1.id.id=obj.id and prop0.name='author' and (prop0.value like '%$authorFirstName $authorLastName%' or prop0.value like '%$authorLastName, $authorFirstName%') and prop1.name = 'status' and prop1.value = '$status'" )
74 -#set( $sql = $from + " where " + $where )
75 -#set($pubFound = $xwiki.searchDocuments($sql))
76 -#if ($pubFound.size()>0)
77 - #if (!$oneStatus)
67 +#foreach( $status in $statusList )
68 + #set( $from = ", BaseObject as obj, LargeStringProperty as prop0, StringProperty as prop1" )
69 + #set( $where = "obj.name=doc.fullName and obj.className='Publications.PublicationClass' and obj.name<>'Publications.PublicationClassTemplate' and prop0.id.id=obj.id and prop1.id.id=obj.id and prop0.name='author' and (prop0.value like '%$authorFirstName $authorLastName%' or prop0.value like '%$authorLastName, $authorFirstName%') and prop1.name = 'status' and prop1.value = '$status'" )
70 + #set( $sql = $from + " where " + $where )
71 + #set( $pubFound = $xwiki.searchDocuments($sql) )
72 + #set( $pubStatusNo = $pubFound.size() )
73 + #if( $pubStatusNo > 0 )
74 + #if( !$oneStatus )
78 78  (% style="border-style:solid hidden hidden solid; border-color:silver; text-align:left; font-style:oblique" %)|{{id name='$sort'/}}{{pubStatus plural='true' uppercase='true'}}$status{{/pubStatus}}{{id name="$status"/}}
79 - #end
80 - #foreach( $pub in $pubFound )
76 + #end
77 + #foreach( $pub in $pubFound )
81 81  |(% style='color:#if( $xwikiTheme == 'dark' ) silver #else dimgray #end; display:block; line-height:1.25em; margin-top:0; margin-bottom:0em'%){{pubAutheditors eds='true'}}$pub{{/pubAutheditors}}
82 82  {{pubTitle}}$pub{{/pubTitle}}
83 83  {{pubVenue}}$pub{{/pubVenue}}(%%)
81 + #end
82 +(% style="#if( !$oneStatus )border-style:hidden solid solid hidden;#end border-color:silver; text-align:right; font-style:oblique; font-weight:normal; font-size:smaller; color:gray" %)|($pubStatusNo #if( $pubStatusNo > 1 ){{pubStatus plural='true'}}$status{{/pubStatus}}#else{{pubStatus plural='false'}}$status{{/pubStatus}}#end) [[[top]>>||anchor="top"]]
83 + #end
84 84  #end
85 -(% style='font-style:oblique;font-size:smaller;text-align:right;color:gray;margin-top:-0.5em;margin-bottom:0em' %)((( ($pubFound.size() #if($pubFound.size() > 1){{pubStatus plural='true'}}$status{{/pubStatus}}#else{{pubStatus plural='false'}}$status{{/pubStatus}}#end) [[[top]>>||anchor="top"]] )))(%%)
86 -#end
87 -#end
88 88  {{/velocity}}