Implement round preparation

This commit is contained in:
2021-11-09 00:29:07 +01:00
parent de6dc03dda
commit 388c729235
3 changed files with 183 additions and 14 deletions

View File

@ -30,7 +30,7 @@
{% for player in game.players.values() %}
<tr>
<td>{{ player.name }}</td>
<td>{{ player.score }}</td>
<td>{{ player.score }}{% if player.score <= 0 %} ☠️ {% elif player.score >= 9 %} 9⃣ {% endif %}</td>
</tr>
{% endfor %}
</tbody>
@ -44,7 +44,7 @@
<li>
<b>État :</b>
{% if game.state.value == 0 %}
<span style="color: yellow;">En préparation ...</span>
<span style="color: orange;">En préparation ...</span>
{% elif game.state.value == 1 %}
<span style="color: red;">Votes en cours ...</span>
{% else %}
@ -55,7 +55,7 @@
<h2>Récapitulatif par tour</h2>
{% for round in game.rounds %}
{% for round in game.rounds if admin or game.state.value > 0 or round.round < game.rounds|length %}
<h3>Tour n°{{ round.round }}</h3>
<table>
@ -74,9 +74,9 @@
{% if loop.index0 == 0 %}
<td rowspan="2">{{ room.room.value }}</td>
{% endif %}
<td>{{ vote.player1.name }}{% if vote.player2 %}, {{ vote.player2.name }}{% endif %}</td>
<td>{{ vote.player1.name|default('<em>personne</em>')|safe }}{% if vote.player2 %}, {{ vote.player2.name }}{% endif %}</td>
{% if round.round != game.rounds|length or game.state.value == 2 or admin %}
<td>{{ vote.vote.value|default('Pas de vote') }}</td>
<td>{{ vote.vote.value|default('<em>Pas de vote</em>')|safe }}</td>
{% else %}
<td><em>Vote en cours ...</em></td>
{% endif %}