MonScoDocEssai/app/templates/entreprises/contacts.html

81 lines
3.4 KiB
HTML
Raw Normal View History

2021-12-29 14:41:33 +01:00
{# -*- mode: jinja-html -*- #}
2021-12-23 23:21:47 +01:00
{% extends 'base.html' %}
{% block app_content %}
{% 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 %}
<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 %}
2022-01-31 18:22:54 +01:00
2022-02-01 18:35:48 +01:00
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesExport, None) %}
2022-02-03 16:53:59 +01:00
<div class="container boutons">
2022-02-01 18:35:48 +01:00
{% if contacts %}
<a class="btn btn-default" href="{{ url_for('entreprises.export_contacts') }}">Exporter la liste des contacts</a>
<a class="btn btn-default" href="{{ url_for('entreprises.export_contacts_bis') }}">Exporter la liste des contacts avec leur entreprise</a>
{% endif %}
</div>
{% endif %}
2021-12-23 23:21:47 +01:00
<div class="container">
<h1>Liste des contacts</h1>
2022-02-03 16:53:59 +01:00
{% if contacts.items %}
2021-12-23 23:21:47 +01:00
<div class="table-responsive">
<table class="table table-bordered table-hover">
<tr>
<th>Nom</th>
<th>Prenom</th>
<th>Telephone</th>
<th>Mail</th>
2021-12-29 19:40:57 +01:00
<th>Poste</th>
<th>Service</th>
2021-12-23 23:21:47 +01:00
<th>Entreprise</th>
</tr>
2022-01-31 18:22:54 +01:00
{% for contact in contacts.items %}
2021-12-23 23:21:47 +01:00
<tr class="table-row active">
<th>{{ contact[0].nom }}</th>
<th>{{ contact[0].prenom }}</th>
<th>{{ contact[0].telephone }}</th>
<th>{{ contact[0].mail }}</th>
2021-12-29 19:40:57 +01:00
<th>{{ contact[0].poste}}</th>
<th>{{ contact[0].service}}</th>
2021-12-23 23:21:47 +01:00
<th><a href="{{ url_for('entreprises.fiche_entreprise', id=contact[1].id) }}">{{ contact[1].nom }}</a></th>
</tr>
{% endfor %}
</table>
2022-02-03 16:53:59 +01:00
</div>
2022-01-31 18:22:54 +01:00
2022-02-03 16:53:59 +01:00
<div class="text-center">
<a href="{{ url_for('entreprises.contacts', page=contacts.prev_num) }}" class="btn btn-default {% if contacts.page == 1 %}disabled{% endif %}">
&laquo;
</a>
{% for page_num in contacts.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %}
{% if page_num %}
{% if contacts.page == page_num %}
<a href="{{ url_for('entreprises.contacts', page=page_num) }}" class="btn btn-inverse">{{ page_num }}</a>
{% else %}
<a href="{{ url_for('entreprises.contacts', page=page_num) }}" class="btn btn-default">{{ page_num }}</a>
{% endif %}
2021-12-23 23:21:47 +01:00
{% else %}
2022-02-03 16:53:59 +01:00
...
{% endif %}
{% endfor %}
<a href="{{ url_for('entreprises.contacts', page=contacts.next_num) }}" class="btn btn-default {% if contacts.page == contacts.pages %}disabled{% endif %}">
&raquo;
</a>
2021-12-23 23:21:47 +01:00
</div>
2022-02-03 16:53:59 +01:00
<p class="text-center">
Page {{ contacts.page }} sur {{ contacts.pages }}
</p>
{% else %}
<div>Aucun contact présent dans la base</div>
2021-12-23 23:21:47 +01:00
{% endif %}
</div>
{% endblock %}