{% extends "base.html" %}
{% load i18n %}
{% load url from future %}

{% block main %}
<h1>{% trans "Notifications" %}</h1>
<form action="{% url "object_events_mark" %}" method="post" class="notifications">
    <ul>
        {% for notification in object_list %}
            {% include "object_events/partials/notification.html" %}
        {% endfor %}
    </ul>
    <button type="submit" name="bulk_mark" value="{% for notification in object_list %}{{ notification.pk }},{% endfor %}">{% trans "Mark all as read" %}</button>
</form>

{% if is_paginated %}
    {% if page_obj.has_previous %}
        <a href="?page={{ object_list.previous_page_number }}">{% trans "previous" %}</a>
    {% endif %}
    {% blocktrans with number=page_obj.number num_pages=page_obj.paginator.num_pages %}Page {{ number }} of {{ num_pages }}{% endblocktrans %}
    {% if page_obj.has_next %}
        <a href="?page={{ page_obj.next_page_number }}">{% trans "next" %}</a>
    {% endif %}
{% endif %}
{% endblock %}