2021-12-29 14:41:33 +01:00
|
|
|
{# -*- mode: jinja-html -*- #}
|
2021-12-23 23:21:47 +01:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
2022-02-17 20:11:20 +01:00
|
|
|
{% block styles %}
|
|
|
|
{{super()}}
|
|
|
|
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
2022-03-23 12:39:52 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables/datatables.min.css">
|
|
|
|
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables/datatables.min.js"></script>
|
2022-02-17 20:11:20 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
2021-12-23 23:21:47 +01:00
|
|
|
{% block app_content %}
|
2022-02-02 19:13:50 +01:00
|
|
|
{% include 'entreprises/nav.html' %}
|
|
|
|
|
2021-12-23 23:21:47 +01:00
|
|
|
{% if logs %}
|
|
|
|
<div class="container">
|
2022-01-31 18:22:54 +01:00
|
|
|
<h3>Dernières opérations <a href="{{ url_for('entreprises.logs') }}">Voir tout</a></h3>
|
2021-12-23 23:21:47 +01:00
|
|
|
<ul>
|
|
|
|
{% for log in logs %}
|
2022-02-10 21:17:22 +01:00
|
|
|
<li><span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span><span>{{ log.text|safe }} par {{ log.authenticated_user|get_nomcomplet_by_username }}</span></li>
|
2021-12-23 23:21:47 +01:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-01-31 18:22:54 +01:00
|
|
|
|
2022-02-03 16:53:59 +01:00
|
|
|
<div class="container boutons">
|
2022-02-10 21:17:22 +01:00
|
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesExport, None) %}
|
2022-03-28 23:44:57 +02:00
|
|
|
<a class="btn btn-default" href="{{ url_for('entreprises.import_correspondants') }}">Importer des correspondants</a>
|
2022-02-10 21:17:22 +01:00
|
|
|
{% endif %}
|
2022-03-28 23:44:57 +02:00
|
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesExport, None) and correspondants %}
|
|
|
|
<a class="btn btn-default" href="{{ url_for('entreprises.export_correspondants') }}">Exporter la liste des correspondants</a>
|
2022-02-01 18:35:48 +01:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
2022-02-25 09:45:14 +01:00
|
|
|
<div class="container" style="margin-bottom: 10px;">
|
2022-03-28 23:44:57 +02:00
|
|
|
<h1>Liste des correspondants</h1>
|
|
|
|
<table id="table-correspondants">
|
2022-02-17 20:11:20 +01:00
|
|
|
<thead>
|
2021-12-23 23:21:47 +01:00
|
|
|
<tr>
|
2022-02-17 20:11:20 +01:00
|
|
|
<td data-priority="1">Nom</td>
|
|
|
|
<td data-priority="3">Prenom</td>
|
2022-03-30 20:17:35 +02:00
|
|
|
<td data-priority="4">Téléphone</td>
|
2022-02-17 20:11:20 +01:00
|
|
|
<td data-priority="5">Mail</td>
|
|
|
|
<td data-priority="6">Poste</td>
|
|
|
|
<td data-priority="7">Service</td>
|
|
|
|
<td data-priority="2">Entreprise</td>
|
2021-12-23 23:21:47 +01:00
|
|
|
</tr>
|
2022-02-17 20:11:20 +01:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2022-03-28 23:44:57 +02:00
|
|
|
{% for correspondant in correspondants %}
|
2022-02-17 20:11:20 +01:00
|
|
|
<tr>
|
2022-03-28 23:44:57 +02:00
|
|
|
<td>{{ correspondant[0].nom }}</td>
|
|
|
|
<td>{{ correspondant[0].prenom }}</td>
|
|
|
|
<td>{{ correspondant[0].telephone }}</td>
|
|
|
|
<td>{{ correspondant[0].mail }}</td>
|
|
|
|
<td>{{ correspondant[0].poste}}</td>
|
|
|
|
<td>{{ correspondant[0].service}}</td>
|
2022-04-28 23:04:31 +02:00
|
|
|
<td><a href="{{ url_for('entreprises.fiche_entreprise', id=correspondant[1].entreprise_id) }}">{{ correspondant[1].nom }}</a></td>
|
2021-12-23 23:21:47 +01:00
|
|
|
</tr>
|
2022-02-03 16:53:59 +01:00
|
|
|
{% endfor %}
|
2022-02-17 20:11:20 +01:00
|
|
|
</tbody>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
|
|
<td>Nom</td>
|
|
|
|
<td>Prenom</td>
|
2022-03-30 20:17:35 +02:00
|
|
|
<td>Téléphone</td>
|
2022-02-17 20:11:20 +01:00
|
|
|
<td>Mail</td>
|
|
|
|
<td>Poste</td>
|
|
|
|
<td>Service</td>
|
|
|
|
<td>Entreprise</td>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
</table>
|
2021-12-23 23:21:47 +01:00
|
|
|
</div>
|
2022-02-17 20:11:20 +01:00
|
|
|
|
|
|
|
<script>
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
2022-03-28 23:44:57 +02:00
|
|
|
let table = new DataTable('#table-correspondants',
|
2022-02-17 20:11:20 +01:00
|
|
|
{
|
|
|
|
"autoWidth": false,
|
|
|
|
"responsive": {
|
|
|
|
"details": true
|
|
|
|
},
|
|
|
|
"pageLength": 10,
|
|
|
|
"language": {
|
|
|
|
"emptyTable": "Aucune donnée disponible dans le tableau",
|
|
|
|
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
|
|
|
|
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
|
|
|
|
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
|
|
|
|
"lengthMenu": "Afficher _MENU_ entrées",
|
|
|
|
"loadingRecords": "Chargement...",
|
|
|
|
"processing": "Traitement...",
|
|
|
|
"search": "Rechercher:",
|
|
|
|
"zeroRecords": "Aucune entrée correspondante trouvée",
|
|
|
|
"paginate": {
|
|
|
|
"next": "Suivante",
|
|
|
|
"previous": "Précédente"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2021-12-23 23:21:47 +01:00
|
|
|
{% endblock %}
|