Browse Source

update player table calculated values

testing
Burathar 4 years ago
parent
commit
70942e82d8
  1. 18
      app/templates/game_owner_dashboard.html

18
app/templates/game_owner_dashboard.html

@ -25,20 +25,18 @@ @@ -25,20 +25,18 @@
</tr>
</thead>
<tbody>
{% for user in game.users %}
{% for player in game.players %}
<tr>
<td><a href="{{ url_for('main.game_player', game_name = game.name, username = user.name) }}">{{ user.name }}</a></td>
{% for gameplayer in user.user_games if gameplayer.game == game %}
<td>{{ gameplayer.role.name }}</td>
{% endfor %}
<td>{{ user.found_objectives | selectattr('game', '==', game)|list|length}}</td>
<td>{{ user.caught_players | selectattr('game', '==', game)|list|length}}</td>
<td>{{ user.caught_by_players | selectattr('game', '==', game)|list|length}}</td>
<td>{% with location = user.last_location(game) %}
<td><a href="{{ url_for('main.game_player', game_name = game.name, username = player.user.name) }}">{{ player.user.name }}</a></td>
<td>{{ player.role.name }}</td>
<td>{{ player.found_objectives | list | length }}</td>
<td>{{ player.caught_players | list | length }}</td>
<td>{{ player.caught_by_players | list | length }}</td>
<td>{% with location = player.last_location() %}
{% if location %}{{ moment(location.timestamp).fromNow()}}: {% endif %}
{{ location }}
{% endwith %}</td>
<td><a href="{{ url_for('main.remove_player', game_name=game.name, username=user.name) }}">
<td><a href="{{ url_for('main.remove_player', game_name=game.name, username=player.user.name) }}">
<button class="btn btn-danger">Delete</button></a>
</td>
</tr>

Loading…
Cancel
Save