Browse Source

add computed columns

feature_tests
Burathar 4 years ago
parent
commit
089df1733d
  1. 12
      app/templates/game_dashboard.html

12
app/templates/game_dashboard.html

@ -18,6 +18,7 @@
<th scope="col">Role</th> <th scope="col">Role</th>
<th scope="col">Objectives found</th> <th scope="col">Objectives found</th>
<th scope="col">Bunnies Caught</th> <th scope="col">Bunnies Caught</th>
<th scope="col">Been Caught</th>
<th scope="col">Last location</th> <th scope="col">Last location</th>
</tr> </tr>
</thead> </thead>
@ -28,9 +29,10 @@
{% for gameplayer in player.player_games if gameplayer.game == game %} {% for gameplayer in player.player_games if gameplayer.game == game %}
<td>{{ gameplayer.role.name }}</td> <td>{{ gameplayer.role.name }}</td>
{% endfor %} {% endfor %}
<td>{{ "Placeholder" }}</td> <td>{{ player.found_objectives | selectattr('game', '==', game)|list|length}}</td>
<td>{{ "Placeholder" }}</td> <td>{{ player.caught_players | selectattr('game', '==', game)|list|length}}</td>
<td> Placeholder <td> <td>{{ player.caught_by_players | selectattr('game', '==', game)|list|length}}</td>
<td>{{ player.last_location(game) }}<td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
@ -46,7 +48,7 @@
<th scope="col">Objective Name</th> <th scope="col">Objective Name</th>
<th scope="col">Latitude</th> <th scope="col">Latitude</th>
<th scope="col">Longitude</th> <th scope="col">Longitude</th>
<th scope="col">Amount of players that found it</th> <th scope="col">Times found</th>
<th scope="col">Hash</th> <th scope="col">Hash</th>
<th scope="col"></th> <th scope="col"></th>
</tr> </tr>
@ -57,7 +59,7 @@
<td>{{ objective.name }}</td> <td>{{ objective.name }}</td>
<td>{{ objective.latitude }}</td> <td>{{ objective.latitude }}</td>
<td>{{ objective.longitude }}</td> <td>{{ objective.longitude }}</td>
<td>Placeholder</td> <td>{{ objective.found_by|length }}</td>
<td><a href="{{ url_for('objective', objective_hash = objective.hash) }}">{{ objective.hash }}</a></td> <td><a href="{{ url_for('objective', objective_hash = objective.hash) }}">{{ objective.hash }}</a></td>
<td><a href="{{ url_for('objective_delete', objective_hash = objective.hash) }}"> <td><a href="{{ url_for('objective_delete', objective_hash = objective.hash) }}">
<button class="btn btn-danger">Delete</button></a> <button class="btn btn-danger">Delete</button></a>

Loading…
Cancel
Save