show opponent online status when game completes

This commit is contained in:
Thibault Duplessis 2014-03-15 22:39:51 +01:00
parent 7629479d1b
commit 610783a331
3 changed files with 4 additions and 4 deletions

View file

@ -110,7 +110,7 @@ object Round extends LilaController with TheftPrevention {
import templating.Environment.playerLink
pov.game.tournamentId ?? TournamentRepo.byId map { tour =>
val players = (pov.game.players collect {
case player if player.isHuman => player.color.name -> playerLink(player).body
case player if player.isHuman => player.color.name -> playerLink(player, withStatus = true).body
} toMap) ++ ctx.me.??(me => Map("me" -> me.usernameWithRating))
val table = if (player) html.round.table.end(pov, tour) else html.round.table.watch(pov)
Json.obj(

View file

@ -32,7 +32,7 @@ signedJs = pov.game.rated option routes.Round.signedJs(pov.gameId) map (_.toStri
}
<div class="lichess_table onbg@{ if(game.hasClock) " table_with_clock" }@{ if(game.finished) " finished" }">
<div class="lichess_opponent">
@round.username(pov.opponent, engine, true)
@round.username(pov.opponent, engine, withStatus = true)
</div>
<div class="lichess_separator"></div>
<div class="table_inner">

View file

@ -7,8 +7,8 @@
</div>
<div class="lichess_control buttons">
@game.tournamentId.map { tourId =>
<a
class="button @tour.fold(false)(_.isRunning).fold("strong", "") view_tournament"
<a
class="button @tour.fold(false)(_.isRunning).fold("strong", "") view_tournament"
href="@routes.Tournament.show(tourId)" data-icon="G"> @trans.backToTournament()</a>
}.getOrElse {
@if(opponent.isHuman) {