{% extends "admin/base_site.html" %}
{% load i18n %}

{% block title %} {% trans "Logs" %} {% endblock %}
{% block nav-global %}{% endblock %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="/admin/">{% trans "Home" %}</a> > Admin_log_view</div>{% endblock %}

{% block content %}

<h2>{% trans "Logs page" %}</h2>

{% if not file  %}
<p> There is no log for the moment.</p>
{% else %}
{% for log in logs.object_list %}
    {% if "CRITICAL" in log %}
        <p> <strong> {{ log  }} </strong> </p>
    {% else %}
        {% if "ERROR" in log %}
            <p> <strong> {{ log }} </strong> </p>
        {% else %}
            <p> {{ log }} </p>
        {% endif %}
    {% endif %}
{% endfor %}

<div class = "pagination">
    <span class = "step-links">
        {% if logs.has_previous %}
            <a href = "?page={{ logs.previous_page_number }}">previous</a>
        {% endif  %}

        <span class="current">
            Page {{ logs.number }} of {{ logs.paginator.num_pages }}.
        </span>

        {% if logs.has_next %}
            <a href="?page={{ logs.next_page_number }}">next</a>
        {% endif %}

    </span>
</div>
{% endif  %}
{% endblock %}

