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