Commit 2cae872c authored by erdnaxe's avatar erdnaxe 🎇

Simplify med templates

parent 621f2a6c
{% if reversions.paginator %}
<ul class="pagination nav navbar-nav">
{% if reversions.has_previous %}
<li><a href="?page={{ reversions.previous_page_number }}">Suivants</a></li>
{% endif %}
{% for page in reversions.paginator.page_range %}
<li class="{% if reversions.number == page %}active{% endif %}"><a href="?page={{ page }}">{{ page }}</a>
</li>
{% endfor %}
{% if reversions.has_next %}
<li><a href="?page={{ reversions.next_page_number }}">Précédents</a></li>
{% endif %}
</ul>
{% endif %}
<table class="table table-striped">
<thead>
<tr>
<th>Date</th>
<th>Cableur</th>
<th>Commentaire</th>
</tr>
</thead>
{% for rev in reversions %}
<tr>
<td>{{ rev.revision.date_created }}</td>
<td>{{ rev.revision.user }}</td>
<td>{{ rev.revision.comment }}</td>
</tr>
{% endfor %}
</table>
{% extends "med/sidebar.html" %}
{% extends "base.html" %}
{% block title %}Historique{% endblock %}
{% block content %}
<h2>Historique de {{ object }}</h2>
{% include "med/aff_history.html" with reversions=reversions %}
{% if reversions.paginator %}
<ul class="pagination nav navbar-nav">
{% if reversions.has_previous %}
<li><a href="?page={{ reversions.previous_page_number }}">Suivants</a></li>
{% endif %}
{% for page in reversions.paginator.page_range %}
<li class="{% if reversions.number == page %}active{% endif %}"><a
href="?page={{ page }}">{{ page }}</a>
</li>
{% endfor %}
{% if reversions.has_next %}
<li><a href="?page={{ reversions.next_page_number }}">Précédents</a></li>
{% endif %}
</ul>
{% endif %}
<table class="table table-striped">
<thead>
<tr>
<th>Date</th>
<th>Cableur</th>
<th>Commentaire</th>
</tr>
</thead>
{% for rev in reversions %}
<tr>
<td>{{ rev.revision.date_created }}</td>
<td>{{ rev.revision.user }}</td>
<td>{{ rev.revision.comment }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}
{% extends "med/sidebar.html" %}
{% extends "base.html" %}
{% block title %}Accueil{% endblock %}
......
{% extends "base.html" %}
{% block sidebar %}
{% endblock %}
......@@ -5,7 +5,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Méd : {% block title %}Accueil{% endblock %}</title>
<title>Med : {% block title %}{% endblock %}</title>
{# CSS style #}
<link rel="stylesheet" href="{% static "/css/bootstrap.min.css" %}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment