{% extends "layout.html" %}
{% set active_id = "references_incoming" %}
{% 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">{{ _('Incoming references') }}</h1>
<p class="text-muted">Hier findest du Veranstaltungen anderer Organisationen, die du empfiehlst. Um eine Veranstaltungen zu empfehlen, wähle &quot;{{ _('Reference event') }}&quot; auf einer Veranstaltungsseite, die du über die <a href="{{ url_for('event_dates') }}">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_reference', id=reference.id) }}">{{ _('View') }}</a>
                <a class="dropdown-item" href="{{ url_for('event_reference_update', id=reference.id) }}">{{ _('Edit') }}</a>
                <a class="dropdown-item" href="{{ url_for('reference_delete', id=reference.id) }}">{{ _('Delete') }}&hellip;</a>
            </div>
        </div>
        {{ render_event_warning_pills(reference.event) }}
        <small>{{ reference.event.admin_unit.name }}</small>
    </li>
{% endfor %}
</ul>

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

{% endblock %}