fix player opponents table - for #4753
This commit is contained in:
parent
219a41f917
commit
ab73ef6df5
|
@ -3,6 +3,31 @@
|
||||||
@user.layout(title = "%s - %s".format(u.username, trans.favoriteOpponents.txt())) {
|
@user.layout(title = "%s - %s".format(u.username, trans.favoriteOpponents.txt())) {
|
||||||
<div class="content_box no_padding">
|
<div class="content_box no_padding">
|
||||||
<h1>@userLink(u, withOnline = false) @trans.favoriteOpponents()</h1>
|
<h1>@userLink(u, withOnline = false) @trans.favoriteOpponents()</h1>
|
||||||
@user.relatedTable(u, sugs)
|
<table class="slist best_opponents">
|
||||||
|
@if(sugs.size > 0) {
|
||||||
|
<tbody>
|
||||||
|
@sugs.map { r =>
|
||||||
|
<tr>
|
||||||
|
<td>@userLink(r.user)</td>
|
||||||
|
<td>@showBestPerf(r.user)</td>
|
||||||
|
<td>
|
||||||
|
@r.nbGames.filter(_ > 0).map { nbGames =>
|
||||||
|
<a href="@routes.User.games(u.username, "search")?players.b=@r.user.username" class="hint--bottom" data-hint="Games count over your last 1000 games">
|
||||||
|
@trans.nbGames.pluralSame(nbGames)
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
<td>@relation.actions(r.user.id, r.relation, followable = r.followable, blocked = false).toHtml</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
} else {
|
||||||
|
<tbody>
|
||||||
|
<tr><td colspan="2">
|
||||||
|
None found.<br />
|
||||||
|
</td></tr>
|
||||||
|
</tbody>
|
||||||
|
}
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
@(u: User, sugs: List[lila.relation.Related])(implicit ctx: Context)
|
|
||||||
<table class="slist best_opponents">
|
|
||||||
@if(sugs.size > 0) {
|
|
||||||
<tbody>
|
|
||||||
@sugs.map { r =>
|
|
||||||
<tr>
|
|
||||||
<td>@userLink(r.user)</td>
|
|
||||||
<td>@showBestPerf(r.user)</td>
|
|
||||||
<td>
|
|
||||||
@r.nbGames.filter(_ > 0).map { nbGames =>
|
|
||||||
<a href="@routes.User.games(u.username, "search")?players.b=@r.user.username" class="hint--bottom" data-hint="Games count over your last 1000 games">
|
|
||||||
@trans.nbGames.pluralSame(nbGames)
|
|
||||||
</a>
|
|
||||||
}
|
|
||||||
</td>
|
|
||||||
<td>@relation.actions(r.user.id, r.relation, followable = r.followable, blocked = false)</td>
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
</tbody>
|
|
||||||
} else {
|
|
||||||
<tbody>
|
|
||||||
<tr><td colspan="2">
|
|
||||||
None found.<br />
|
|
||||||
</td></tr>
|
|
||||||
</tbody>
|
|
||||||
}
|
|
||||||
</table>
|
|
||||||
|
|
Loading…
Reference in a new issue