{% extends 'spectator_events/base.html' %}

{% block head_page_title %}Venues{% endblock %}
{% block content_title %}Venues{% endblock %}

{% block breadcrumbs %}
    {{ block.super }}
    <li class="breadcrumb-item active">Venues</li>
{% endblock %}

{% block content %}

    {% if venue_list|length > 0 %}
        {% if page_obj|default:False and page_obj.number > 1 %}
            {% include 'spectator_core/includes/pagination.html' with page_obj=page_obj only %}
        {% endif %}

        <ul>
            {% for venue in venue_list %}
                <li class="mb-2">
                    <a href="{{ venue.get_absolute_url }}"><strong>{{ venue.name }}</strong></a><br>
                    {{ venue.address }}, {{ venue.country_name }}
                </li>
            {% endfor %}
        </ul>

        {% include 'spectator_core/includes/pagination.html' with page_obj=page_obj only %}

    {% else %}
        <p>There are no venues to show.</p>
    {% endif %}

{% endblock content %}
