2022-02-02 19:13:50 +01:00
|
|
|
{# -*- mode: jinja-html -*- #}
|
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{% block app_content %}
|
2022-07-06 20:37:20 +02:00
|
|
|
<div class="container">
|
|
|
|
<ul class="breadcrumbs">
|
|
|
|
<li class="breadcrumbs_item">
|
|
|
|
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
|
|
|
</li>
|
|
|
|
<li class="breadcrumbs_item">
|
2022-07-11 16:06:38 +02:00
|
|
|
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=entreprise.id) }}" class="breadcrumbs_link">Fiche entreprise</a>
|
2022-07-06 20:37:20 +02:00
|
|
|
</li>
|
|
|
|
<li class="breadcrumbs_item">
|
|
|
|
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Dernières opérations</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
2022-02-02 19:13:50 +01:00
|
|
|
<div class="container">
|
|
|
|
<h3>Dernières opérations - {{ entreprise.nom }}</h3>
|
2022-02-08 16:40:32 +01:00
|
|
|
{% if logs.items %}
|
2022-02-02 19:13:50 +01:00
|
|
|
<ul>
|
|
|
|
{% for log in logs.items %}
|
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>
|
2022-02-02 19:13:50 +01:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2022-02-08 16:40:32 +01:00
|
|
|
|
|
|
|
<div class="text-center">
|
2022-07-11 16:06:38 +02:00
|
|
|
<a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id, page=logs.prev_num) }}" class="btn btn-default {% if logs.page == 1 %}disabled{% endif %}">
|
2022-02-08 16:40:32 +01:00
|
|
|
«
|
|
|
|
</a>
|
|
|
|
{% for page_num in logs.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %}
|
|
|
|
{% if page_num %}
|
|
|
|
{% if logs.page == page_num %}
|
2022-07-11 16:06:38 +02:00
|
|
|
<a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id, page=page_num) }}" class="btn btn-inverse">{{ page_num }}</a>
|
2022-02-08 16:40:32 +01:00
|
|
|
{% else %}
|
2022-07-11 16:06:38 +02:00
|
|
|
<a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id, page=page_num) }}" class="btn btn-default">{{ page_num }}</a>
|
2022-02-08 16:40:32 +01:00
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
...
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2022-07-11 16:06:38 +02:00
|
|
|
<a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id, page=logs.next_num) }}" class="btn btn-default {% if logs.page == logs.pages %}disabled{% endif %}">
|
2022-02-08 16:40:32 +01:00
|
|
|
»
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p class="text-center">
|
|
|
|
Page {{ logs.page }} sur {{ logs.pages }}
|
|
|
|
</p>
|
2022-02-02 19:13:50 +01:00
|
|
|
{% else %}
|
2022-02-08 16:40:32 +01:00
|
|
|
<div>Aucune opération</div>
|
2022-02-02 19:13:50 +01:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2022-02-08 16:40:32 +01:00
|
|
|
|
2022-02-02 19:13:50 +01:00
|
|
|
{% endblock %}
|