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

Loading…
Cancel
Save