Enhance group detail view: add conditional buttons for game and member removal based on group ownership
This commit is contained in:
parent
7e54c6e0ad
commit
637b497362
1 changed files with 7 additions and 5 deletions
|
@ -26,7 +26,7 @@
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<table class="striped">
|
<table class="striped">
|
||||||
<thead>
|
<thead>
|
||||||
<th></th>
|
{% if group.owner == user %}<th></th>{% endif %}
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th>Joueurs</th>
|
<th>Joueurs</th>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -46,9 +46,11 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
{% if group.owner == user %}
|
||||||
<button type="submit" formaction="{% url "group_remove_game" pk=group.pk %}">
|
<button type="submit" formaction="{% url "group_remove_game" pk=group.pk %}">
|
||||||
<i class="ri-delete-bin-fill"></i> Supprimer les parties sélectionnées
|
<i class="ri-delete-bin-fill"></i> Supprimer les parties sélectionnées
|
||||||
</button>
|
</button>
|
||||||
|
{% endif %}
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h2>
|
<h2>
|
||||||
|
@ -92,7 +94,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% if musics %}
|
{% if group.owner == user %}
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
formaction="{% url "group_remove_member" pk=group.pk %}">
|
formaction="{% url "group_remove_member" pk=group.pk %}">
|
||||||
<i class="ri-delete-bin-fill"></i> Supprimer les membres sélectionnés
|
<i class="ri-delete-bin-fill"></i> Supprimer les membres sélectionnés
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue