{% extends "admin/_base.html" %}

{% from "macros/box.html" import m_box %}

{% block content %}
  {%- call m_box(title="Global audit") %}
    <ul class="pagination">
      <li {% if not top_date %}class="disabled"{% endif %}><a
        href="?after={{ top_date|default }}">{{ _("Previous") }}</a></li>
      <li {% if not lowest_date %}class="disabled"{% endif %}><a
        href="?before={{ lowest_date|default }}">{{ _("Next") }}</a></li>
    </ul>

    <div style="margin-bottom: 25px;">
      {% for day, entries in entries %}
        <ul class="unstyled"><h2>{{ day.strftime('%d-%m-%Y') }}</h2>
          {% for entry in entries %}
            <li>{{ entry.date.strftime('%H:%M') }} {{ entry.render() }}</li>
          {% endfor %}
        </ul>
      {% endfor %}
    </div>

    <ul class="pagination">
      <li {% if not top_date %}class="disabled"{% endif %}><a
        href="?after={{ top_date|default }}">{{ _("Previous") }}</a></li>
      <li {% if not lowest_date %}class="disabled"{% endif %}><a
        href="?before={{ lowest_date|default }}">{{ _("Next") }}</a></li>
    </ul>
  {%- endcall %}
{% endblock %}
