2021-12-23 19:28:25 +01:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{% block app_content %}
|
|
|
|
{% if logs %}
|
|
|
|
<div class="container">
|
|
|
|
<h3>Dernières opérations</h3>
|
|
|
|
<ul>
|
|
|
|
{% for log in logs %}
|
|
|
|
<li><span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span><span>{{ log.text|safe }} par {{ log.authenticated_user|get_nomcomplet }}</span></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="container">
|
|
|
|
<h1>Liste des entreprises</h1>
|
|
|
|
{% if entreprises %}
|
|
|
|
<div class="table-responsive">
|
2021-12-23 23:21:47 +01:00
|
|
|
<table class="table table-bordered table-hover">
|
2021-12-23 19:28:25 +01:00
|
|
|
<tr>
|
|
|
|
<th>SIRET</th>
|
|
|
|
<th>Nom</th>
|
|
|
|
<th>Adresse</th>
|
|
|
|
<th>Code postal</th>
|
|
|
|
<th>Ville</th>
|
|
|
|
<th>Pays</th>
|
|
|
|
<th>Action</th>
|
|
|
|
</tr>
|
|
|
|
{% for entreprise in entreprises %}
|
|
|
|
<tr class="table-row active">
|
|
|
|
<th><a href="{{ url_for('entreprises.fiche_entreprise', id=entreprise.id) }}">{{ entreprise.siret }}</a></th>
|
2021-12-23 23:21:47 +01:00
|
|
|
<th>{{ entreprise.nom }}</th>
|
2021-12-23 19:28:25 +01:00
|
|
|
<th>{{ entreprise.adresse }}</th>
|
|
|
|
<th>{{ entreprise.codepostal }}</th>
|
|
|
|
<th>{{ entreprise.ville }}</th>
|
|
|
|
<th>{{ entreprise.pays }}</th>
|
|
|
|
<th>
|
|
|
|
<div class="btn-group">
|
|
|
|
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">Action
|
|
|
|
<span class="caret"></span>
|
|
|
|
</a>
|
2021-12-27 19:00:38 +01:00
|
|
|
<ul class="dropdown-menu pull-right">
|
2021-12-23 19:28:25 +01:00
|
|
|
<li><a href="{{ url_for('entreprises.edit_entreprise', id=entreprise.id) }}">Modifier</a></li>
|
|
|
|
<li><a href="{{ url_for('entreprises.delete_entreprise', id=entreprise.id) }}" style="color:red">Supprimer</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% else %}
|
|
|
|
<div>Aucune entreprise présent dans la base</div>
|
|
|
|
<br>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-12-24 18:10:19 +01:00
|
|
|
<div>
|
|
|
|
<a class="btn btn-default" href="{{ url_for('entreprises.add_entreprise') }}">Ajouter une entreprise</a>
|
|
|
|
{% if entreprises %}
|
|
|
|
<a class="btn btn-default" href="{{ url_for('entreprises.export_entreprises') }}">Exporter la liste des entreprises</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2021-12-23 19:28:25 +01:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|