{% load i18n %}
{% load url from future %}
{% if authenticated %}
    <a id="notificationBtn" class="btn" href="{% url "object_events_list" %}">
        <span class="badge{% if unread_amount > 0 %} badge-important{% endif %}">{{ unread_amount }}</span>
        {% trans "Notifications" %}
    </a>
    <form action="{% url "object_events_mark" %}" method="post" class="notifications" id="notificationBar">
        {% csrf_token %}
        <ul>
            {% for notification in notifications %}
                {% include "object_events/partials/notification.html" %}
            {% endfor %}
        </ul>
        <button type="submit" name="bulk_mark" value="{% for notification in notifications %}{{ notification.pk }},{% endfor %}">{% trans "Mark all as read" %}</button>
        <input type="hidden" name="next" value="{{ request.get_full_path }}" />
    </form>
{% endif %}