Sections: improve table + form
This commit is contained in:
parent
ff2bb2d443
commit
08c18baa85
3 changed files with 67 additions and 65 deletions
|
|
@ -21,55 +21,57 @@
|
|||
</div>
|
||||
|
||||
{% if Sections %}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-25">Nom</th>
|
||||
<th class="w-25">Section parente</th>
|
||||
<th class="w-25">Membres</th>
|
||||
<th class="w-25">Contacts</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for Section in Sections %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/sections/{{ Section.ID }}">
|
||||
{{ Section.Name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if Section.ParentSectionID %}
|
||||
{{ Section.ParentSection.Name }}
|
||||
{% else %}
|
||||
<i class="bi-x-lg text-danger me-1"></i>
|
||||
Non
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if Section.ContainsMembers %}
|
||||
<i class="bi-check-lg text-success me-1"></i>
|
||||
Oui
|
||||
{% else %}
|
||||
<i class="bi-x-lg text-danger me-1"></i>
|
||||
Non
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if Section.ContainsContacts %}
|
||||
<i class="bi-check-lg text-success me-1"></i>
|
||||
Oui
|
||||
{% else %}
|
||||
<i class="bi-x-lg text-danger me-1"></i>
|
||||
Non
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% for Section in Sections %}
|
||||
<div class="card card-body my-2 py-2 bg-body-tertiary">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-12 col-sm-8 col-md-9 col-xl-3 order-1">
|
||||
<div class="text-bold fs-7 mt-xxl-0 mt-2">Nom</div>
|
||||
<div>
|
||||
<a href="/admin/sections/{{ Section.ID }}">
|
||||
{{ Section.Name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-8 col-md-9 col-xl-3 order-2 order-sm-3 order-xl-2">
|
||||
<div class="text-bold fs-7 mt-xxl-0 mt-2">Section parente</div>
|
||||
<div>
|
||||
{% if Section.ParentSectionID %}
|
||||
<a href="/admin/sections/{{ Section.ParentSectionID }}">
|
||||
{{ Section.ParentSection.Name }}
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="badge text-bg-danger">Pas de section parente</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-4 col-md-3 col-xl-3 order-3 order-sm-2 order-xl-3">
|
||||
<div class="text-bold fs-7 mt-xxl-0 mt-2">Membres</div>
|
||||
<div>
|
||||
{% if Section.ContainsMembers %}
|
||||
<span class="badge text-bg-success">Oui</span>
|
||||
{% else %}
|
||||
<span class="badge text-bg-danger">Non</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-4 col-md-3 col-xl-3 order-4">
|
||||
<div class="text-bold fs-7 mt-xxl-0 mt-2">Sympathisants</div>
|
||||
<div>
|
||||
{% if Section.ContainsContacts %}
|
||||
<span class="badge text-bg-success">Oui</span>
|
||||
{% else %}
|
||||
<span class="badge text-bg-danger">Non</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="my-4">Pas de section pour le moment</div>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue