Show last authors
1 {{velocity filter="indent"}}
2 $xwiki.ssx.use('GoogleSummerOfCode.ProjectClassSheet')##
3 #set($obj = $doc.getObject("GoogleSummerOfCode.ProjectClass"))
4 #set($class = $obj.xWikiClass)
5 #if($obj && $hasEdit)
6 #set($oldYear = "$obj.getProperty('year').value")
7 #set($crtYear = "$xwiki.formatDate($xwiki.date, 'yyyy')")
8 #if($oldYear != '' && $oldYear != $crtYear)
9 #set($newName = $doc.name.replaceAll($oldYear, ''))
10 #set($newName = "${newName}${crtYear}")
11 #set($newTitle = $doc.title)
12 #if("$!newTitle" == '')
13 #set($newTitle = $newName)
14 #end
15 {{html wiki="false" clean="false"}}<a class="clone-link" style="font-weight: 900; display: block; float: right;" href="$xwiki.getURL("GoogleSummerOfCode.${newName}", 'save', "template=${doc.fullName}&amp;title=${newTitle}&amp;${class.name}_${obj.number}_year=${crtYear}&amp;form_token=$!{services.csrf.getToken()}")">Clone to this year &raquo;</a>{{/html}}
16 #end
17 #end
18
19 ## #if($obj && $obj.getProperty('name').value != '')
20 ## = $obj.getProperty('name').value =
21 ## #end
22
23 (% class="project-info" %)(((
24 #set ($inEditMode = $xcontext.action == 'inline' || $xcontext.action == 'edit')
25 #if ($inEditMode)
26 ; Project title
27 : {{html clean="false" wiki="false"}}<input type="text" name="title" value="$!{doc.title}"/>{{/html}}
28 #end
29 #foreach($prop in $class.properties)
30 #if (${prop.getName()} != 'name' || $util.parseInt($!{obj.getProperty('year').value}) < 2011) ## todo: migrate older projects, then remove this hack
31 #if ($inEditMode)
32 ; ${prop.prettyName}
33 : $doc.display($prop.getName(), "edit", $obj)
34 #elseif("$!{obj.getProperty($prop.getName()).value}" != '')
35 ; ${prop.prettyName}
36 : $doc.display($prop.getName(), "rendered", $obj)
37 #end
38 #end
39 #end
40 )))
41 {{/velocity}}

Get Connected