Enhance group detail view: add conditional buttons for game and member removal based on group ownership

This commit is contained in:
Edgar P. Burkhart 2025-06-14 12:27:24 +02:00
parent 7e54c6e0ad
commit 637b497362
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -26,7 +26,7 @@
{% csrf_token %}
<table class="striped">
<thead>
<th></th>
{% if group.owner == user %}<th></th>{% endif %}
<th>Date</th>
<th>Joueurs</th>
</thead>
@ -46,9 +46,11 @@
{% endfor %}
</tbody>
</table>
<button type="submit" formaction="{% url "group_remove_game" pk=group.pk %}">
<i class="ri-delete-bin-fill"></i> Supprimer les parties sélectionnées
</button>
{% if group.owner == user %}
<button type="submit" formaction="{% url "group_remove_game" pk=group.pk %}">
<i class="ri-delete-bin-fill"></i> Supprimer les parties sélectionnées
</button>
{% endif %}
</form>
{% endif %}
<h2>
@ -92,7 +94,7 @@
{% endfor %}
</tbody>
</table>
{% if musics %}
{% if group.owner == user %}
<button type="submit"
formaction="{% url "group_remove_member" pk=group.pk %}">
<i class="ri-delete-bin-fill"></i> Supprimer les membres sélectionnés