forked from ScoDoc/ScoDoc
102 lines
4.1 KiB
HTML
102 lines
4.1 KiB
HTML
{# -*- mode: jinja-html -*- #}
|
|
{% extends 'base.html' %}
|
|
|
|
{% block styles %}
|
|
{{super()}}
|
|
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables2022/datatables.min.css">
|
|
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables2022/datatables.min.js"></script>
|
|
{% endblock %}
|
|
|
|
{% block app_content %}
|
|
{% include 'entreprises/nav.html' %}
|
|
|
|
{% if logs %}
|
|
<div class="container">
|
|
<h3>Dernières opérations <a href="{{ url_for('entreprises.logs') }}">Voir tout</a></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_by_username }}</span></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="container boutons">
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesExport, None) %}
|
|
<a class="btn btn-default" href="{{ url_for('entreprises.import_contacts') }}">Importer des contacts</a>
|
|
{% endif %}
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesExport, None) and contacts %}
|
|
<a class="btn btn-default" href="{{ url_for('entreprises.export_contacts') }}">Exporter la liste des contacts</a>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="container" style="margin-bottom: 10px;">
|
|
<h1>Liste des contacts</h1>
|
|
<table id="table-contacts">
|
|
<thead>
|
|
<tr>
|
|
<td data-priority="1">Nom</td>
|
|
<td data-priority="3">Prenom</td>
|
|
<td data-priority="4">Telephone</td>
|
|
<td data-priority="5">Mail</td>
|
|
<td data-priority="6">Poste</td>
|
|
<td data-priority="7">Service</td>
|
|
<td data-priority="2">Entreprise</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for contact in contacts %}
|
|
<tr>
|
|
<td>{{ contact[0].nom }}</td>
|
|
<td>{{ contact[0].prenom }}</td>
|
|
<td>{{ contact[0].telephone }}</td>
|
|
<td>{{ contact[0].mail }}</td>
|
|
<td>{{ contact[0].poste}}</td>
|
|
<td>{{ contact[0].service}}</td>
|
|
<td><a href="{{ url_for('entreprises.fiche_entreprise', id=contact[1].id) }}">{{ contact[1].nom }}</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td>Nom</td>
|
|
<td>Prenom</td>
|
|
<td>Telephone</td>
|
|
<td>Mail</td>
|
|
<td>Poste</td>
|
|
<td>Service</td>
|
|
<td>Entreprise</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
let table = new DataTable('#table-contacts',
|
|
{
|
|
"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>
|
|
{% endblock %} |