Show last authors
1 {{velocity}}
2 {{html wiki="true"}}
3 (% class="xform" %)
4 (((
5 #if($xwiki.user.isUserInGroup('xwiki:XWiki.FirstMembers'))
6 [[Create Entry>>doc:Secondment.WebHome||class="button"]]
7 #end
8 <table>
9 #set($MYCLASS='Secondment.Code.SecondmentClass')
10 #set($pages=$services.query.xwql("select doc from Document as doc, doc.object($MYCLASS) as page where doc.hidden=0 order by page.dateFrom desc").execute())
11 #foreach($rawpage in $pages)
12 #set($page=$xwiki.getDocument($rawpage))
13 #set($obj=$page.getObject($MYCLASS))
14 <tr>
15 #if ($!page.getValue('secondee'))
16 #set($secondeeRef=$services.model.resolveDocument($!page.getValue('secondee')))
17 #set($secondee=$xwiki.getDocument($secondeeRef).getObject('People.Code.PeopleClass'))##.get('People.Code.PeopleClass'))
18 #set($sender=$!xwiki.getDocument($!secondee.getValue('organization')).getObject('Partners.Code.PartnersClass'))
19 #else
20 #set($secondeeRef="")
21 #set($secondee="")
22 #set($sender="")
23 #end
24 <td width="25%" valign="middle" style="text-align:center;" rowspan="2">
25 <div style="text-align:center; background-color:#fcfcfc; border-radius: 1.5ex; display: inline-block; vertical-align:middle; margin: 0.25ex 0.5ex; padding: 0.6ex; box-shadow:0 2px 2px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.19); width: min-content;">
26 #if($!secondee && $!secondee!="")
27 [[image:$!secondeeRef@$secondee.getValue('image')|| width="250" style="max-width:14em; border-radius: 1.5ex; "]]<br/>
28 <span style="display: inline-block; vertical-align:middle; padding-top: 1ex;">
29 #if($!sender && $!sender.getValue('logo'))
30 [[image:$!secondee.getValue('organization')@$!sender.getValue('logo')|| height=70 style="max-height:2.5em; margin:0ex 1ex;"]]
31 #end
32 [[$!secondee['name'].replace(' ','&nbsp;')>>$secondeeRef||style="font-size:1.5em]]
33 </span>
34 #end
35 </div>
36 </td>
37 <td>
38 #if($!obj.getValue('host'))
39 #set($hostName=$xwiki.getDocument($!{obj.getValue('host')}).getValue('name'))
40 #else
41 #set($hostName=""){{warning}}No host{{/warning}}<br/>
42 #end
43 <h3>
44 [[Visiting $!hostName from $datetool.format("medium_date",$page.getValue('dateFrom')) to $datetool.format("medium_date",$page.getValue('dateTo'))>>$rawpage]]
45 </h3>
46 $doc.display('story', $xcontext.action, $obj)
47 <br/>
48 #if($!{obj.getValue('videos')})
49 #set($videos=$obj.getValue('videos').trim())
50 #if($!videos!="")
51 ## <h2>media</h2>
52 #foreach($video in $videos.split(" "))
53 <div style="display: inline-block">
54
55 {{video url="$video" width="192" height="108" /}}
56
57 </div>
58 #end
59 #end
60 ## $page['media']
61 #end
62 </td>
63 </tr>
64 <tr><td valign="bottom" style="border:none; text-align: right">
65 #if($!obj.getValue('host'))
66 {{organizationRef org="$!obj.getValue('host')"}}{{/organizationRef}}
67 #end
68 </td></tr>
69 #end
70 </table>
71 )))
72 {{/html}}
73 {{/velocity}}
Copyright 2017-2018, FIRST Consortium - This project has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 734599