Show last authors
1 {{include reference="Publications.Environment"/}}{{include reference="Environment"/}}{{velocity}}
2 #set( $publicationMenu = true )
3 #### get parameters
4 ## who
5 #set( $userNamePar = $context.getRequest().getParameter("user") )
6 #set( $firstNamePar = $context.getRequest().getParameter("name") )
7 #set( $lastNamePar = $context.getRequest().getParameter("surname") )
8 ## which status
9 #set($statusPar = $context.getRequest().getParameter("status"))
10 ##
11 #### handle who
12 #if( $userName )
13 ## from a personal page, "XWiki.PersonalSpace" $userName form
14 #set( $oneAuthor = true )
15 #set( $userdoc = $xwiki.getDocument($userName) )
16 #set( $authorFirstName = $userdoc.display("first_name") )
17 #set( $authorLastName = $userdoc.display("last_name") )
18 #elseif( $userNamePar )
19 ## from the URL, "user=PersonalSpace" parameter
20 #set( $oneAuthor = true)
21 #set( $userdoc = $xwiki.getDocument("XWiki.$userNamePar") )
22 #set( $authorFirstName = $userdoc.display("first_name") )
23 #set( $authorLastName = $userdoc.display("last_name") )
24 #elseif( $firstNamePar && $lastNamePar )
25 ## from the URL, "name=Firstname&surname=Lastname" parameter
26 #set( $oneAuthor = true )
27 #set( $authorFirstName = $firstNamePar )
28 #set( $authorLastName = $lastNamePar )
29 #else
30 #set( $oneAuthor = false )
31 #set( $authorFirstName = "" )
32 #set( $authorLastName = "" )
33 #end
34 ##
35 #### handle status
36 ## $oneStatus false gets a list of statuses, true just one
37 #set( $oneStatus = false )
38 ## $statusList gets the list of statuses to be shown
39 ## default: all unpublished papers except Rejected ones
40 #set( $statusList = $statusRangeUnpublished )
41 #if( $statusPar.toLowerCase() == "all" )
42 ## 'all' value gets all unpublished papers including "Rejected" ones
43 #set($statusList = $statusRangeUnpublishedFull)
44 #else
45 #if( $statusRangeFull.contains($statusPar) )
46 ## 'status' parameter is an admissible publication status value
47 #set($oneStatus = true)
48 #set($statusList = [$statusPar])
49 #end
50 #end
51 ##
52 {{id name="top"/}}
53 #if( $oneAuthor )#if( $oneStatus )
54 >**{{pubStatus uppercase='true' plural='true'}}$statusPar{{/pubStatus}}** / $authorFirstName $authorLastName
55 #else
56 >**{{pubStatus uppercase='true' plural='true'}}unpublished{{/pubStatus}}** / $authorFirstName $authorLastName
57 #end#elseif($oneStatus)
58 >{{pubStatus uppercase='true' plural='true'}}$statusPar{{/pubStatus}}
59 #else
60 >{{pubStatus uppercase='true' plural='true'}}unpublished{{/pubStatus}}
61 #end
62 ##
63 #if( !$oneStatus )
64 (% style="font-size: smaller; padding:1em 1.5em 0.25em 1.5em; background-color:$theme.highlightColor" %)(((#foreach( $status in $statusList )#if( $velocityCount > 1 ) | #end[[{{pubStatus}}$status{{/pubStatus}}>>||anchor=$status]]#end)))
65 #end
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 )
75 (% style="border-style:solid hidden hidden solid; border-color:$theme.borderColor; 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 )
78 |(% style='color:$theme.textColor; display:block; line-height:1.25em; margin-top:0; margin-bottom:0em'%){{pubAutheditors eds='true'}}$pub{{/pubAutheditors}}
79 {{pubTitle}}$pub{{/pubTitle}}
80 {{pubVenue}}$pub{{/pubVenue}}(%%)
81 #end
82 (% style="#if( !$oneStatus )border-style:hidden solid solid hidden;#end border-color:$theme.borderColor; 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 #end
85 {{/velocity}}
Partita IVA: 01131710376 - Copyright © 2008-2021 APICe@DISI Research Group - PRIVACY