Browse Source

Add found-by table

QR-seachgame
Burathar 3 years ago
parent
commit
ec2b6febdd
  1. 25
      app/templates/objective.html

25
app/templates/objective.html

@ -56,6 +56,31 @@
</div> </div>
<hr> <hr>
{% if owner and objective.objective_found_by %}
<div class="row">
<h2>Found by:</h2>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">Player name</th>
<th scope="col">Time</th>
</tr>
</thead>
<tbody>
{% for ofbp in objective.objective_found_by %}
<tr>
<td><a href="url_for('main.game_player', game_name = game.name, username = ofbp.game_player.user.name)">{{ ofbp.game_player.user.name }}</a></td>
<td>{{ moment(ofbp.timestamp).fromNow() }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
{% endblock %} {% endblock %}

Loading…
Cancel
Save