{% extends "layout.html" %}
{% set active_id = "references_outgoing" %}
{% from "_macros.html" import render_event_in_list, render_event_warning_pills, render_event_date, render_pagination, render_event_organizer %}
{%- block title -%}
{{ _('References') }}
{%- endblock -%}
{% block content %}

<h1 class="mb-1">{{ _('Outgoing references') }}</h1>
<p class="text-muted">Hier findest du deine Veranstaltungen, die von anderen Organisationen empfohlen werden. Um eine andere Organisation um eine Empfehlung zu bitten, wähle &quot;{{ _('Empfehlung anfragen') }}&quot; auf einer deiner Veranstaltungsseiten, die du über die <a href="{{ url_for('manage_admin_unit_events', id=admin_unit.id) }}">Suche</a> finden kannst.</p>

<ul class="list-group mt-4">
{% for reference in references %}
    <li class="list-group-item">
        {{ render_event_in_list(reference.event) }}
        <div class="dropdown d-inline-block">
            <button class="btn btn-link dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ reference.event.name }}</button>
            <div class="dropdown-menu">
                <a class="dropdown-item" href="{{ url_for('event', event_id=reference.event.id) }}">{{ _('View') }}</a>
            </div>
        </div>
        {{ render_event_warning_pills(reference.event) }}
        <small>{{ reference.admin_unit.name }}</small>
    </li>
{% endfor %}
</ul>

<div class="my-4">{{ render_pagination(pagination) }}</div>

{% endblock %}