{% comment %}
Used for Plays and Movies, listing different Events that item was visited.

Expects:

* events - A list or Queryset of Event objects.
* heading_level - The level of heading to use, eg ('h2'). Default is None; no heading.
{% endcomment %}

{% if events|length > 0 %}
    {% if heading_level|default:False %}
        <{{ heading_level }}>Viewings</{{ heading_level }}>
    {% endif %}
    <ul>
        {% for event in events %}
            <li class="mb-2">
                <p>
                    {% if event.title %}
                      <strong>{{ event.title }}</strong><br>
                    {% endif %}
                    <a href="{{ event.venue.get_absolute_url }}">{{ event.venue }}</a>,
                    {{ event.date|date:"j M Y" }}
                </p>
                {% include 'spectator_core/includes/roles_list.html' with roles=event.roles.all %}
                {{ event.note|linebreaks }}
            </li>
        {% endfor %}
    </ul>
{% endif %}

{% comment %}
Used for Plays and Movies, listing different Events that item was visited.

Expects:

* events - A list or Queryset of Event objects.
* heading_level - The level of heading to use, eg ('h2'). Default is None; no heading.
{% endcomment %}

{% if events|length > 0 %}
    {% if heading_level|default:False %}
        <{{ heading_level }}>Viewings</{{ heading_level }}>
    {% endif %}
    <ul>
        {% for event in events %}
            <li class="mb-2">
                <p>
                    {% if event.title %}
                      <strong>{{ event.title }}</strong><br>
                    {% endif %}
                    <a href="{{ event.venue.get_absolute_url }}">{{ event.venue }}</a>,
                    {{ event.date|date:"j M Y" }}
                </p>
                {% include 'spectator_core/includes/roles_list.html' with roles=event.roles.all %}
                {{ event.note|safe|linebreaks }}
            </li>
        {% endfor %}
    </ul>
{% endif %}

Allow HTML in Event notes in visits list
Allow HTML in Event notes in visits list
