lila/app/views/tournament/swissStanding.scala.html

53 lines
1.5 KiB
HTML

@(tour: lila.tournament.StartedOrFinished)(implicit ctx: Context)
@import lila.tournament.swiss.SwissSystem
<div class="standing_wrap scroll-shadow-soft">
<table class="slist standing @if(tour.scheduled) { scheduled }">
<thead>
<tr>
<th class="large">@trans.standing() (@tour.nbPlayers)</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@defining(SwissSystem.scoreSheets(tour)) {
case scoreSheets => {
@tour.rankedPlayers.map {
case (rank, player) => {
@defining(scoreSheets(player.id)) {
case scoreSheet => {
<tr @if(ctx.userId.exists(player.id==)) { class="me" }>
<td class="name">
@if(player.withdraw) {
<span data-icon="b" title="@trans.withdraw()"></span>
} else {
@if(tour.isFinished && rank == 1) {
<span data-icon="g" title="@trans.winner()"></span>
} else {
<span class="rank">@rank</span>
}
}
@userInfosLink(player.id, none, withOnline = false)
</td>
<td class="sheet">
@scoreSheet.scores.reverse.map { score =>
<span class="normal">@score.repr</span>
}
</td>
<td class="total">
<strong>@scoreSheet.totalRepr</strong> (@scoreSheet.neustadtlRepr)
</td>
</tr>
<tr><td class="around-bar" colspan="3"><div class="bar" data-value="@scoreSheet.total"></div></td></tr>
}
}
}
}
}
}
</tbody>
</table>
</div>