pop-camarades/views/fields.html

88 lines
1.8 KiB
HTML

{% extends "layouts/main.html" %}
{% block main %}
<div class="container my-4">
<div class="mb-4">
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Accueil</a></li>
<li class="breadcrumb-item"><a href="/admin">Administration</a></li>
<li class="breadcrumb-item active">Champs supplémentaires</li>
</ol>
</nav>
<hr>
</div>
<div class="my-3 text-end">
<a class="btn btn-outline-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 %}