71v2/project/templates/airtable/participants/participants_list.html
Florian du Garage Num 07ccbd3db1 initial commit
2023-04-13 15:34:46 +02:00

44 lines
1.8 KiB
HTML

{% extends 'airtable_base.html' %}
{% block content %}
<div class="column is-9">
<section class="section">
<div class="container">
<h2 class="title">Participants</h2>
<table class="table is-bordered is-striped is-hoverable is-fullwidth">
<thead>
<tr>
<th>Nom</th>
<th>Date de naissance</th>
<th>Sexe</th>
<th>Adresse</th>
<th>CNI</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>{{ record['fields']['Nom complet'] }}</td>
<td>{{ record['fields']['Date de naissance'] }}</td>
<td>{{ record['fields']['Sexe'] }}</td>
<td>{{ record['fields']['Adresse complète'] }}</td>
<td>
{% for attachment in record['fields']['CNI'] %}
<a href="{{ attachment['url']}}" ><img src="{{ attachment['thumbnails']['small']['url']}}"></img></a>
{% endfor %}
</td>
<td>
<a class="button is-small is-primary" href="{{ url_for('airtable.display_participant_form', participant_number=record['fields']['Number']) }}">Voir</a>
<a class="button is-small is-primary" href="{{ url_for('airtable.edit_participant', participant_number=record['fields']['Number']) }}">Edit</a>
</td>
</tr>
</{% endfor %}
</tbody>
</table>
</div>
</section>
</div>
{% endblock %}