Changes for page Per Status

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

Summary

Details

Page properties
Content
... ... @@ -51,35 +51,38 @@
51 51  ##
52 52  {{id name="top"/}}
53 53  #if( $oneAuthor )#if( $oneStatus )
54 +
54 54  >**{{pubStatus uppercase='true' plural='true'}}$statusPar{{/pubStatus}}** / $authorFirstName $authorLastName
55 55  #else
57 +
56 56  >**{{pubStatus uppercase='true' plural='true'}}unpublished{{/pubStatus}}** / $authorFirstName $authorLastName
57 57  #end#elseif($oneStatus)
60 +
58 58  >{{pubStatus uppercase='true' plural='true'}}$statusPar{{/pubStatus}}
59 59  #else
63 +
60 60  >{{pubStatus uppercase='true' plural='true'}}unpublished{{/pubStatus}}
61 61  #end
62 -##
66 +
63 63  #if( !$oneStatus )
64 64  (% 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)))
65 65  #end
66 66  ##
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 )
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)
75 75  (% 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"/}}
76 - #end
77 - #foreach( $pub in $pubFound )
79 + #end
80 + #foreach( $pub in $pubFound )
78 78  |(% 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}}
79 79  {{pubTitle}}$pub{{/pubTitle}}
80 80  {{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
85 85  {{/velocity}}