Hide unnecessary categories in groups

This commit is contained in:
Gabriel Augendre 2023-01-18 21:29:57 +01:00
parent 21c8e96132
commit 9448feed1d

View file

@ -8,70 +8,70 @@
<a href="{% url "party:create" %}" class="btn btn-primary mb-3"> <a href="{% url "party:create" %}" class="btn btn-primary mb-3">
<i class="fa-solid fa-user-plus"></i> Nouveau groupe <i class="fa-solid fa-user-plus"></i> Nouveau groupe
</a> </a>
<h2>Groupes que vous gérez</h2> {% if managed_parties %}
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4"> <h2>Groupes que vous gérez</h2>
{% for party in managed_parties %} <div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4">
<div class="col"> {% for party in managed_parties %}
<div class="card party" data-id="{{ party.pk }}"> <div class="col">
<div class="card-body"> <div class="card party" data-id="{{ party.pk }}">
<h5 class="card-title"> <div class="card-body">
{{ party.name }} <h5 class="card-title">
</h5> {{ party.name }}
<div class="btn-group btn-group-sm"> </h5>
<a href="{% url "party:details" pk=party.pk %}" class="btn btn-success access"> <div class="btn-group btn-group-sm">
<a href="{% url "party:details" pk=party.pk %}" class="btn btn-success access">
<i class="fa-solid fa-users"></i> Accéder
</a>
<a href="{% url "party:change" pk=party.pk %}" class="btn btn-secondary edit">
<i class="fa-solid fa-gear"></i> Modifier
</a>
<a href="{% url "party:delete" pk=party.pk %}" class="btn btn-danger delete">
<i class="fa-solid fa-users-slash"></i> Supprimer
</a>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% if played_parties %}
<h2 class="mt-3">Groupes dont vous êtes membre</h2>
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 g-4">
{% for party in played_parties %}
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">
{{ party.name }}
</h5>
<a href="{% url "party:details" pk=party.pk %}" class="btn btn-sm btn-success">
<i class="fa-solid fa-users"></i> Accéder <i class="fa-solid fa-users"></i> Accéder
</a> </a>
<a href="{% url "party:change" pk=party.pk %}" class="btn btn-secondary edit"> </div>
<i class="fa-solid fa-gear"></i> Modifier </div>
</a> </div>
<a href="{% url "party:delete" pk=party.pk %}" class="btn btn-danger delete"> {% endfor %}
<i class="fa-solid fa-users-slash"></i> Supprimer </div>
{% endif %}
{% if invited_to %}
<h2 class="mt-3">Groupes auxquels vous avez été invités</h2>
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 g-4">
{% for party in invited_to %}
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">
{{ party.name }}
</h5>
<a href="{% url "party:details" pk=party.pk %}" class="btn btn-sm btn-success">
<i class="fa-solid fa-users"></i> Accéder
</a> </a>
</div> </div>
</div> </div>
</div> </div>
</div> {% endfor %}
{% empty %} </div>
<div class="col">Aucun</div> {% endif %}
{% endfor %}
</div>
<h2 class="mt-3">Groupes dont vous êtes membre</h2>
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 g-4">
{% for party in played_parties %}
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">
{{ party.name }}
</h5>
<a href="{% url "party:details" pk=party.pk %}" class="btn btn-sm btn-success">
<i class="fa-solid fa-users"></i> Accéder
</a>
</div>
</div>
</div>
{% empty %}
<div class="col">Aucun</div>
{% endfor %}
</div>
<h2 class="mt-3">Groupes auxquels vous avez été invités</h2>
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 g-4">
{% for party in invited_to %}
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">
{{ party.name }}
</h5>
<a href="{% url "party:details" pk=party.pk %}" class="btn btn-sm btn-success">
<i class="fa-solid fa-users"></i> Accéder
</a>
</div>
</div>
</div>
{% empty %}
<div class="col">Aucun</div>
{% endfor %}
</div>
{% endblock %} {% endblock %}