diff --git a/app/controllers/Round.scala b/app/controllers/Round.scala
index 57b01c440a..380bb8ba8a 100644
--- a/app/controllers/Round.scala
+++ b/app/controllers/Round.scala
@@ -120,7 +120,7 @@ object Round extends LilaController with TheftPrevention {
val table = if (player) html.round.table.end(pov, tour) else html.round.table.watch(pov)
Json.obj(
"players" -> players,
- "infobox" -> html.game.infoBox(pov, tour).toString,
+ "infobox" -> html.game.infoBox(pov, tour, withTourStanding = player).toString,
"table" -> table.toString)
}
}
diff --git a/app/views/analyse/replay.scala.html b/app/views/analyse/replay.scala.html
index 9fb0e206d8..7c06696118 100644
--- a/app/views/analyse/replay.scala.html
+++ b/app/views/analyse/replay.scala.html
@@ -37,7 +37,7 @@
@analyse.layout(
title = title,
-goodies = views.html.game.infoBox(pov, tour).some,
+goodies = views.html.game.infoBox(pov, tour, withTourStanding = false).some,
chat = chat.map(c => base.chat(c, trans.spectatorRoom.str())),
underchat = underchat.some,
moreCss = moreCss,
diff --git a/app/views/game/infoBox.scala.html b/app/views/game/infoBox.scala.html
index cd12d7d46e..fd3d1b2559 100644
--- a/app/views/game/infoBox.scala.html
+++ b/app/views/game/infoBox.scala.html
@@ -1,4 +1,4 @@
-@(pov: Pov, tour: Option[lila.tournament.Tournament])(implicit ctx: Context)
+@(pov: Pov, tour: Option[lila.tournament.Tournament], withTourStanding: Boolean)(implicit ctx: Context)
@import pov._
@@ -47,12 +47,53 @@
@tour match {
- case Some(t: lila.tournament.Started) => {
+ case Some(t: lila.tournament.StartedOrFinished) => {
@if(t.scheduled) {@t.name} else {@trans.xTournament(t.name)}
+ @t match {
+ case t: lila.tournament.Started => {
+ }
+ case _ => {
+ }
+ }
+ @if(withTourStanding) {
+
+
+ @t.rankedPlayers.map {
+ case (rank, player) => {
+ @defining((
+ if(t.isFinished && rank == 1) "winner" else if (player.withdraw) "withdraw" else "",
+ t scoreSheet player
+ )) {
+ case (flag, scoreSheet) => {
+
+
+ @if(player.withdraw) {
+
+ } else {
+ @if(t.isFinished && rank == 1) {
+
+ } else {
+ @rank
+ }
+ }
+ @userInfosLink(player.id, none, withOnline = false)
+ |
+
+ @scoreSheet.total
+ |
+
+ |
+ }
+ }
+ }
+ }
+
+
+ }
}
case _ => {
diff --git a/app/views/round/player.scala.html b/app/views/round/player.scala.html
index a9b5a77e54..aea346623a 100644
--- a/app/views/round/player.scala.html
+++ b/app/views/round/player.scala.html
@@ -12,7 +12,7 @@
@round.layout(
title = title,
-goodies = views.html.game.infoBox(pov, tour),
+goodies = views.html.game.infoBox(pov, tour, withTourStanding = true),
chat = chat.map(c => base.chat(c, trans.chatRoom.str())),
underchat = underchat.some,
signedJs = hijackEnabled(pov.game) option routes.Round.signedJs(pov.gameId) map (_.toString)) {
diff --git a/app/views/round/watcher.scala.html b/app/views/round/watcher.scala.html
index 0a1fee2574..de6ab1a2a8 100644
--- a/app/views/round/watcher.scala.html
+++ b/app/views/round/watcher.scala.html
@@ -12,7 +12,7 @@
@round.layout(
title = title,
-goodies = views.html.game.infoBox(pov, tour),
+goodies = views.html.game.infoBox(pov, tour, withTourStanding = false),
chat = chat.map(c => base.chat(c, trans.spectatorRoom.str())),
underchat = underchat.some) {
@watcherGame(pov)
diff --git a/public/stylesheets/board.css b/public/stylesheets/board.css
index a17b3e4d0b..fff6157e5b 100644
--- a/public/stylesheets/board.css
+++ b/public/stylesheets/board.css
@@ -718,6 +718,11 @@ div.under_chat .watchtv {
div.game_tournament {
text-align: center;
line-height: 2em;
+ max-height: 400px;
+ overflow: hidden;
+}
+div.game_tournament:hover {
+ overflow-y: auto;
}
div.game_tournament .title {
display: block;
@@ -730,6 +735,24 @@ div.game_tournament .clock {
font-family: monospace;
font-weight: bold;
}
+div.game_tournament table.standing {
+ margin-top: 10px;
+ border-bottom: none;
+}
+div.game_tournament table.standing tr.me td {
+ background: #e4e4e4;
+}
+div.game_tournament table.standing td {
+ padding: 0;
+ text-align: left;
+}
+div.game_tournament table.standing td.name span {
+ display: inline-block;
+ width: 20px;
+}
+div.game_tournament table.standing td.total {
+ text-align: right;
+}
span.inline_userlist {
display: inline;
color: #9a9a9a;
diff --git a/public/stylesheets/dark.css b/public/stylesheets/dark.css
index d4bbf2ce59..15039cf696 100644
--- a/public/stylesheets/dark.css
+++ b/public/stylesheets/dark.css
@@ -380,6 +380,9 @@ body.dark #puzzle > .right .please_vote {
background: #103410;
color: #74a962;
}
+body.dark div.game_tournament table.standing tr.me td {
+ background: #333;
+}
body.dark::-webkit-input-placeholder {
color: #666;
}