{% extends "base.html" %}

{% block content %}
    <h1>Chronologies</h1>
    <table>
        {% for chronology in object_list %}
        <tr>            
            <td><a href="{{ chronology.get_absolute_url }}">{{ chronology.name }}</a></td>
            <td>
                 {% if chronology.picture %}
                 <img src="{{ chronology.picture.url }}" width="48" height="48" alt=""/>
                 {% endif %}
            </td>
        </tr>
        {% endfor %}
    </table>

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

        <span class="current">
            Page {{ page_obj.number }} sur {{ page_obj.paginator.num_pages }}.
        </span>

        {% if page_obj.has_next %}
            <a href="?page={{ page_obj.next_page_number }}">suivante</a>
        {% endif %}
    </span>
</div>
{% endif %}
{% endblock %}