From 70942e82d831df18d49e3a0b461079197d887d14 Mon Sep 17 00:00:00 2001 From: Burathar Date: Sun, 19 Jul 2020 16:58:21 +0200 Subject: [PATCH] update player table calculated values --- app/templates/game_owner_dashboard.html | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/app/templates/game_owner_dashboard.html b/app/templates/game_owner_dashboard.html index 805362c..6bffbc5 100644 --- a/app/templates/game_owner_dashboard.html +++ b/app/templates/game_owner_dashboard.html @@ -25,20 +25,18 @@ - {% for user in game.users %} + {% for player in game.players %} - {{ user.name }} - {% for gameplayer in user.user_games if gameplayer.game == game %} - {{ gameplayer.role.name }} - {% endfor %} - {{ user.found_objectives | selectattr('game', '==', game)|list|length}} - {{ user.caught_players | selectattr('game', '==', game)|list|length}} - {{ user.caught_by_players | selectattr('game', '==', game)|list|length}} - {% with location = user.last_location(game) %} + {{ player.user.name }} + {{ player.role.name }} + {{ player.found_objectives | list | length }} + {{ player.caught_players | list | length }} + {{ player.caught_by_players | list | length }} + {% with location = player.last_location() %} {% if location %}{{ moment(location.timestamp).fromNow()}}: {% endif %} {{ location }} {% endwith %} - +