1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 18:38:26 +02:00

Draw dices

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2023-03-23 16:17:29 +01:00
parent eb8ad4e771
commit 5399a875c6
6 changed files with 418 additions and 30 deletions

View File

@ -31,7 +31,13 @@
<div class="row">
{% for participation in tournament.participations.all %}
<div class="col-md-1">
<div class="badge rounded-pill text-bg-warning">{{ participation.team.trigram }} 🎲 ??</div>
<div id="dice-{{ tournament.id }}-{{ participation.team.trigram }}"
class="badge rounded-pill text-bg-{% if participation.teamdraw_set.all.first.current.last_dice %}success{% else %}warning{% endif %}"
{% if request.user.registration.is_volunteer %}
onclick="drawDice({{ tournament.id }}, '{{ participation.team.trigram }}')"
{% endif %}>
{{ participation.team.trigram }} 🎲 {{ participation.teamdraw_set.all.first.current.last_dice|default:'??' }}
</div>
</div>
{% endfor %}
</div>
@ -149,12 +155,13 @@
<div class="card">
<div class="card-body">
<div id="messages-{{ tournament.id }}" class="alert alert-info">
Information
{{ tournament.draw.information|safe }}
</div>
<div id="launch-dice-{{ tournament.id }}">
<div id="launch-dice-{{ tournament.id }}"
{% if tournament.draw.get_state != 'DICE_SELECT_POULES' %}{% if tournament.draw.get_state != 'DICE_ORDER_POULE' or user.registration.team.trigram not in tournament.draw.current_round.current_pool.trigrams %}class="d-none"{% endif %}{% endif %}>
<div class="text-center">
<button class="btn btn-lg disabled" style="font-size: 100pt">
<button class="btn btn-lg" style="font-size: 100pt" onclick="drawDice({{ tournament.id }})">
🎲
</button>
</div>