Files
pairgoth/view-webapp/src/main/webapp/tour-results.inc.html
2025-09-24 20:25:15 +02:00

54 lines
2.5 KiB
HTML

<div class="tab-content" id="results-tab">
<div id="results-round" class="active-round-box">
Results for round
<button class="ui floating choose-round prev-round button">&laquo;</button>
<span class="active-round">$round</span>
<button class="ui floating choose-round next-round button">&raquo;</button>
#set($stats = $utils.getResultsStats($individualGames))
<span class="norbeak">( <span id="known">$stats.known</span> / $stats.total )</span>
<div id="results-filter" class="toggle">
<input type="checkbox" value="true"/>
<div class="filter-results checkbox">
<div class="circle"></div>
</div>
<label>Filter</label>
</div>
</div>
<div id="results-list" class="roundbox">
<table id="results-table" class="ui celled striped table">
<thead class="centered">
<th data-sort-method="number">table</th>
<th>black</th>
<th>white</th>
<th>hd</th>
<th>result</th>
</thead>
<tbody>
#set($dispRst = {'?':'?', 'w':'0-1', 'b':'1-0', '=':'½-½', 'X':'X', '#':'1-1', '0':'0-0'})
#foreach($game in $individualGames)
#set($white = $plmap[$game.w])
#set($black = $plmap[$game.b])
#if($black && $white)
<tr id="result-$game.id" data-id="$game.id">
<td data-sort="$game.t">${game.t}.</td>
<td class="black player #if($game.r == 'b' || $game.r == '#') winner #elseif($game.r == 'w' || $game.r == '0') looser #end" data-id="$black.id" data-sort="$black.name#if($black.firstname) $black.firstname#end"><span>#if($black)$black.name#if($black.firstname) $black.firstname#end #rank($black.rank)#{else}BIP#end</span></td>
<td class="white player #if($game.r == 'w' || $game.r == '#') winner #elseif($game.r == 'b' || $game.r == '0') looser #end" data-id="$white.id" data-sort="$white.name#if($white.firstname) $white.firstname#end"><span>#if($white)$white.name#if($white.firstname) $white.firstname#end #rank($white.rank)#{else}BIP#end</span></td>
<td class="handicap centered">$!game.h</td>
<td class="result centered" data-sort="$game.r" data-result="$game.r">$dispRst[$game.r]</td>
</tr>
#end
#end
</tbody>
</table>
</div>
<div class="form-actions">
<button id="clear-results" class="ui orange right labeled icon floating info button">
<i class="trash icon"></i>
Clear results
</button>
</div>
</div>
<div id="confirmation" class="hidden">
Clear all results for round <span>$round</span> ?
</div>