# $page.getPageName().replace("_"," ")

$r.render("versions") #if($diffs.size() > 0)
#set($oldVersion = $page.getVersion() - 1) #set($versionFromTo = ["$oldVersion", "$page.getVersion()"])

### $r.translate("diff.comparing", $versionFromTo)

#foreach($diff in $diffs) ##Size: $diff.getSize()
##From: $diff.getFrom()
##To: $diff.getTo()
##Type: $diff.getType()
#if($diff.getType() == "CHANGE") #if($diff.getFrom() == $diff.getTo()) #set ($fromTo = $diff.getFrom()+$diff.getTo()) #set($fromTo = ["$diff.getFrom()", "$fromTo"]) $r.translate("$diff.getType()", $fromTo) #end #if($diff.getFrom() != $diff.getTo()) #set ($fromTo = $diff.getFrom()+$diff.getTo()) #set($fromTo = ["$diff.getFrom()", "$fromTo"]) $r.translate("CHANGE", $fromTo) #end #elseif($diff.getType() == "INSERT") $r.translate("$diff.getType()", "$diff.getSize()") #elseif($diff.getType() == "DELETE") $r.translate("$diff.getType()", "$diff.getSize()") #elseif($diff.getType() == "MOVE") $r.translate("$diff.getType()", "$diff.getSize()") #end
#set ($lines = $diff.getLines()) #if($diff.getType() == "CHANGE")

$r.translate("old.version") #foreach($line in $lines) #if($velocityCount <= $diff.getSize() / 2) $line #end #end | $r.translate("new.version") #foreach($line in $lines) #if($velocityCount > $diff.getSize() / 2) $line #end #end

#elseif($diff.getType() == "INSERT")
#foreach($line in $lines) + $line
#end
#elseif($diff.getType() == "DELETE")
#foreach($line in $lines) - $line
#end
#else #foreach($line in $lines) line: $line
#end #end
#end
#end #if ($r.available("versionDisplay"))
$r.translate("historic.version", "$page.getVersion()") #if($r.available("revert.old.version")) $r.render("revert.old.version") #end
$r.render("versionDisplay")
#end