Improve lists
This commit is contained in:
parent
b3c309743b
commit
1946083679
6 changed files with 120 additions and 93 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "layouts/main.html" %}
|
||||
|
||||
{% block main %}
|
||||
<div class="container mt-4">
|
||||
<div class="container my-4">
|
||||
<div class="mb-4">
|
||||
<nav>
|
||||
<ol class="breadcrumb">
|
||||
|
|
@ -13,55 +13,76 @@
|
|||
<hr>
|
||||
</div>
|
||||
|
||||
{% if Fields %}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Population</th>
|
||||
<th>Type de champ</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for Field in Fields %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/fields/{{ Field.ID }}">
|
||||
{{ Field.Name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% for Key, Value in PersonTypes %}
|
||||
{% if Key == Field.PersonType %}
|
||||
{{ Value }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
{% for Key, Value in FieldTypes %}
|
||||
{% if Key == Field.FieldType %}
|
||||
{{ Value }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="my-4">
|
||||
Pas de champs pour le moment
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="mt-3">
|
||||
<div class="my-3 text-end">
|
||||
<a class="btn btn-md btn-primary" href="/admin/fields/add">
|
||||
<i class="bi-plus-lg"></i>
|
||||
Ajouter
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="h4 my-2">Membres</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-75">Nom</th>
|
||||
<th class="w-25">Type de champ</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for Field in Fields %}
|
||||
{% if Field.PersonType == "member" %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/fields/{{ Field.ID }}">
|
||||
{{ Field.Name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% for Key, Value in FieldTypes %}
|
||||
{% if Key == Field.FieldType %}
|
||||
{{ Value }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="h4 my-2">Contacts</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-75">Nom</th>
|
||||
<th class="w-25">Type de champ</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for Field in Fields %}
|
||||
{% if Field.PersonType == "contact" %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/fields/{{ Field.ID }}">
|
||||
{{ Field.Name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% for Key, Value in FieldTypes %}
|
||||
{% if Key == Field.FieldType %}
|
||||
{{ Value }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue