Browse Source

Give no location in tables

testing
Rogier Neeleman 4 years ago
parent
commit
05efb236ce
  1. 4
      app/templates/game_hunter_dashboard.html
  2. 4
      app/templates/game_owner_dashboard.html

4
app/templates/game_hunter_dashboard.html

@ -33,8 +33,10 @@ @@ -33,8 +33,10 @@
<span style="color:gray;">{{ bunny.player_caught_by_players | selectattr('catching_player', '==', player) | selectattr('review.name', '==', 'none') |list|length}}</span>
</td>
<td>{% with location = bunny.last_location(offset=hunter_delay) %}
{% if location %}{{ moment(location.timestamp).fromNow()}}: {% endif %}
{% if location %}{{ moment(location.timestamp).fromNow()}}
{% else %}
{{ location }}
{% endif %}
{% endwith %}</td>
<td>
<a href="{{ url_for('main.catch_bunny', game_name=game.name, bunny_name=bunny.user.name) }}">

4
app/templates/game_owner_dashboard.html

@ -39,8 +39,10 @@ @@ -39,8 +39,10 @@
<td>{{ player.accepted_caught_players() | list | length }}</td>
<td>{{ player.accepted_caught_by_players() | list | length }}</td>
<td>{% with location = player.last_location() %}
{% if location %}{{ moment(location.timestamp).fromNow()}}: {% endif %}
{% if location %}{{ moment(location.timestamp).fromNow()}}
{% else %}
{{ location }}
{% endif %}
{% endwith %}</td>
<td><a href="{{ url_for('main.remove_player', game_name=game.name, username=player.user.name) }}">
<button class="btn btn-danger">Delete</button></a>

Loading…
Cancel
Save