Wiki source code of No
Last modified by Andrea Omicini on 2020/10/12 15:48
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | #includeMacros("Main.MacroSheet") | ||
2 | #includeMacros("People.MacroSheet") | ||
3 | #includeMacros("Publications.MacroSheet") | ||
4 | #includeMacros("Publications.GlobalVars") | ||
5 | ## | ||
6 | #set( $yearRange = [$lastYear..$firstYear] ) | ||
7 | #if(!$oneYear)#set( $oneYear = false )#end | ||
8 | |||
9 | #set( $yearPar = $context.getRequest().getParameter("year") ) | ||
10 | #set( $firstYearPar = $context.getRequest().getParameter("from") ) | ||
11 | #set( $lastYearPar = $context.getRequest().getParameter("to") ) | ||
12 | |||
13 | #if($firstYearPar) | ||
14 | #set( $yearFirst = $util.parseInt($firstYearPar) ) | ||
15 | #if ( $yearRange.contains($yearFirst) ) | ||
16 | #set( $firstYear = $yearFirst ) | ||
17 | #set( $yearRange = [$lastYear..$firstYear] ) | ||
18 | #end | ||
19 | #end | ||
20 | |||
21 | #if($lastYearPar) | ||
22 | #set( $yearLast = $util.parseInt($lastYearPar) ) | ||
23 | #if ( $yearRange.contains($yearLast) ) | ||
24 | #set( $lastYear = $yearLast ) | ||
25 | #set( $yearRange = [$lastYear..$firstYear] ) | ||
26 | #end | ||
27 | #end | ||
28 | |||
29 | #set($yearList = $yearRange) | ||
30 | #if($yearPar) | ||
31 | #set($year = $util.parseInt($yearPar)) | ||
32 | #if ($yearRange.contains($year) ) | ||
33 | #set($yearList = [$year]) | ||
34 | #set($oneYear = true) | ||
35 | #end | ||
36 | #end | ||
37 | |||
38 | #if(!$authedFirstName)#set( $authedFirstName = "" )#end | ||
39 | #if(!$authedLastName)#set( $authedLastName = "" )#end | ||
40 | #if(!$oneAuthed)#set( $oneAuthed = false )#end | ||
41 | |||
42 | #set( $userNamePar = $context.getRequest().getParameter("user") ) | ||
43 | #set( $firstNamePar = $context.getRequest().getParameter("name") ) | ||
44 | #set( $lastNamePar = $context.getRequest().getParameter("surname") ) | ||
45 | |||
46 | #set( $userNameFull = "" ) | ||
47 | #if($userName) | ||
48 | #set($userNameFull = "#userXWiki($userName)") | ||
49 | #else | ||
50 | #if($userNamePar) | ||
51 | #set($userNameFull = "#userXWiki($userNamePar)") | ||
52 | #end | ||
53 | #end | ||
54 | |||
55 | #if($userNameFull != "") | ||
56 | #set($userdoc = $xwiki.getDocument($userNameFull)) | ||
57 | #set( $authedFirstName = $userdoc.display("first_name") ) | ||
58 | #set( $authedLastName = $userdoc.display("last_name")) | ||
59 | #set( $oneAuthed = true) | ||
60 | #else | ||
61 | #if($firstNamePar && $lastNamePar) | ||
62 | #set( $authedFirstName = $firstNamePar ) | ||
63 | #set( $authedLastName = $lastNamePar ) | ||
64 | #set( $oneAuthed = true) | ||
65 | #end | ||
66 | #end | ||
67 | |||
68 | #set( $autheditedTotal = 0 ) | ||
69 | |||
70 | <a name="top"> </a> | ||
71 | |||
72 | 1 All publications without Google Scholar paper ID #if($oneAuthed) by $authedFirstName $authedLastName #end in the #apice() Space #if ($oneYear) ($year) #else ($firstYear—$lastYear) #end | ||
73 | |||
74 | #if (!$oneYear) | ||
75 | Below, all publications without Google Scholar paper ID #if($oneAuthed) by $authedFirstName $authedLastName #end in the #apice() Space between $firstYear and $lastYear, ordered by year of publication. | ||
76 | ---- | ||
77 | <div> | ||
78 | #foreach ($year in $yearList) | ||
79 | #if ($velocityCount > 1) | #end [$year |#$year] | ||
80 | #end | ||
81 | </div> | ||
82 | ---- | ||
83 | #end | ||
84 | |||
85 | #foreach ($year in $yearList) | ||
86 | #set ($sql = ", BaseObject as obj, StringProperty as prop, LongProperty as prop1, StringProperty as prop2, LargeStringProperty as prop3, StringProperty as prop4 | ||
87 | where | ||
88 | obj.name=doc.fullName and | ||
89 | obj.className='Publications.PublicationClass' and | ||
90 | obj.name<>'Publications.PublicationClassTemplate' and | ||
91 | prop.id.id=obj.id and | ||
92 | prop1.id.id=obj.id and | ||
93 | prop2.id.id=obj.id and | ||
94 | prop3.id.id=obj.id and | ||
95 | prop4.id.id=obj.id and | ||
96 | prop.name = 'status' and | ||
97 | prop.value = 'Published' and | ||
98 | prop1.name = 'year' and | ||
99 | prop1.value = " + $year +" and | ||
100 | prop2.name = 'scholarId' and | ||
101 | prop2.value = '' and | ||
102 | prop3.name='author' and | ||
103 | prop4.name='editor' and | ||
104 | (prop3.value like '%$authedLastName, $authedFirstName%' or | ||
105 | (prop3.value = '' and prop4.value like '%$authedLastName, $authedFirstName%') | ||
106 | ) | ||
107 | ") | ||
108 | #set($pubFound = $xwiki.searchDocuments($sql)) | ||
109 | #if ($pubFound.size()>0) | ||
110 | #set( $autheditedTotal = $autheditedTotal + $pubFound.size()) | ||
111 | #if (!$oneYear) | ||
112 | <a name=$year> </a> | ||
113 | 1.1 $year <em>($pubFound.size())</em> | ||
114 | #else | ||
115 | <em>($pubFound.size())</em> | ||
116 | #end | ||
117 | #foreach ($item in $pubFound) | ||
118 | ## #pubAETVblock($xwiki.getDocument($item).name) | ||
119 | #set($pubDoc=$xwiki.getDocument($item)) | ||
120 | #set($pubObj=$pubDoc.getObject("Publications.PublicationClass")) | ||
121 | * [ $pubDoc.display("title") | $item ] #if ($context.getUser() != "XWiki.XWikiGuest") <a href="$xwiki.getURL($item, 'inline')"><img alt="$msg.get('panels.documentInformation.editIncluded', [$page])" src="$xwiki.getSkinFile('icons/silk/page_white_edit.gif')" /></a> [ <img src='#attachmentDocUrl("Publications.Scholar","scholar.png")' width='40px' alt='Scholar' /> | #scholarUrl($pubDoc.display('scholarId')) ] | ||
122 | |||
123 | #end | ||
124 | |||
125 | #end | ||
126 | <table width="100%"><tr><th align="right"><a href="#top">{pre}[{/pre}top{pre}]{/pre}</a></th></tr></table> | ||
127 | #end | ||
128 | #end | ||
129 | <div align='right'><em>\[total: $autheditedTotal\]</em></div> |