Add group detail link and implement game removal functionality in views

This commit is contained in:
Edgar P. Burkhart 2025-06-13 23:16:53 +02:00
parent 122ae40570
commit dfe312d47d
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
4 changed files with 47 additions and 7 deletions

View file

@ -16,13 +16,28 @@
<h2>
<i class="ri-play-circle-fill"></i> Parties
</h2>
<ul>
{% for game in group.musikgame_set.all %}
<li>
<a href="{% url "game_detail" pk=game.pk %}">{{ game.date }}</a>
</li>
{% endfor %}
</ul>
<table class="striped">
<thead>
<th>Date</th>
<th>Joueurs</th>
<th>
<i class="ri-delete-bin-fill"></i>
</th>
</thead>
<tbody>
{% for game in group.musikgame_set.all %}
<tr>
<td>
<a href="{% url "game_detail" pk=game.pk %}">{{ game.date }}</a>
</td>
<td>{{ game.players.all|join:", " }}</td>
<td>
<a href="{% url "group_remove_game" pk=game.pk %}"><i class="ri-close-fill" alt="Supprimer"></i></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<h2>
<i class="ri-group-2-fill"></i> Membres