fix crosstable POV

pull/87/head
Thibault Duplessis 2014-05-22 02:04:29 +02:00
parent 430952b391
commit 3bdb0d5446
3 changed files with 3 additions and 8 deletions

View File

@ -148,7 +148,7 @@ moreJs = moreJs) {
</div>
@cross.map { c =>
<div class="panel crosstable active">
@views.html.game.crosstable(c)
@views.html.game.crosstable(pov.player.userId.fold(c)(c.fromPov))
</div>
}
</div>

View File

@ -38,8 +38,8 @@ case class Crosstable(
case _ => 0
})))
def fromPov(user: String) =
if (user == user2) copy(user1 = user2, user2 = user1)
def fromPov(userId: String) =
if (userId == user2.id) copy(user1 = user2, user2 = user1)
else this
lazy val size = results.size

5
todo
View File

@ -1,6 +1 @@
the todo list has moved to https://etherpad.mozilla.org/ep/pad/view/ro.3bIwxJwTQYW/latest
deploy
------
db.crosstable.drop()
restart nginx (/people -> /player)