{% extends "base.html" %}

{% block page_title %} - Media{% endblock %}

{% block content %}
<h2 class="mb-5">{{ title }}</h2>

{% for item in object_list %}
    <div class="border-bottom border-danger mt-3">
        <div class="row">
            <div class="col col-12 col-sm-8 col-lg-10 fs-4">
                <a href="{{ item.get_url }}">{{ item.titre }}</a>
            </div>
            <div class="col col-12 col-sm-4 col-lg-2 text-end">
                {{ item.quand|date:'d F Y' }}
            </div>
        </div>
        <div class="pb-3">{{ item.print_infos }}</div>
    </div>
{% empty %}
    <p><i>Aucun document disponible pour le moment</i></p>
{% endfor %}

{% if perms.beesgospel.change_document %}
    <p class="text-danger fst-italic mt-4"><a href="{% url 'admin:beesgospel_document_changelist' %}">Gestion des documents</a></p>
{% endif %}
{% endblock %}
