Title popup with opponent name in standings
This commit is contained in:
@@ -44,6 +44,10 @@
|
||||
});
|
||||
</script>
|
||||
#set($standings = [])
|
||||
#end
|
||||
#set($smap = {})
|
||||
#foreach($part in $standings)
|
||||
#set($smap[$part.num] = $part)
|
||||
#end
|
||||
<table id="standings-table" class="ui striped table">
|
||||
<thead>
|
||||
@@ -65,19 +69,23 @@
|
||||
<tr>
|
||||
<td>$part.num</td>
|
||||
<td>$part.place</td>
|
||||
<td>$part.name#if($part.firstname) $part.firstname#end</td>
|
||||
<td>$esc.html($part.name)#if($part.firstname) $esc.html($part.firstname)#end</td>
|
||||
<td data-sort="$part.rank">#rank($part.rank)</td>
|
||||
<td>#if($part.country)$part.country#end</td>
|
||||
<td>$number.format('0.#', $part.NBW)</td>
|
||||
#set($mx = $round - 1)
|
||||
#foreach($r in [0..$mx])
|
||||
#set($rst = $part.results[$r])
|
||||
#set($opp_num = $math.toLong($rst))
|
||||
#if($opp_num)
|
||||
#set($opponent = $!smap[$opp_num])
|
||||
#end
|
||||
#if($rst.contains('+'))
|
||||
#set($rst = "<b>$rst</b>")
|
||||
#elseif($rst.contains('-'))
|
||||
#set($rst = "<i>$rst</i>")
|
||||
#end
|
||||
<td class="nobreak">$rst</td>
|
||||
<td class="nobreak" #if($opponent)title="$esc.html($opponent.name)#if($opponent.firstname) $esc.html($opponent.firstname)#end #rank($opponent.rank)#if($opponent.country) $opponent.country#end"#end>$rst</td>
|
||||
#end
|
||||
#foreach($crit in $tour.pairing.placement)
|
||||
<td>$number.format('0.#', $part[$crit])</td>
|
||||
|
Reference in New Issue
Block a user