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

<h1 class="mb-1">{{ _('Incoming reference requests') }}</h1>
<p class="text-muted">Hier findest du Anfragen anderer Organisationen, die dich bitten, eine ihrer Veranstaltungen zu empfehlen.</p>

<ul class="list-group mt-4">
{% for request in requests %}
    <li class="list-group-item">
        {{ render_event_in_list(request.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">{{ request.event.name }}</button>
            <div class="dropdown-menu">
                <a class="dropdown-item" href="{{ url_for('event_reference_request_review', id=request.id) }}">{{ _('Review request') }}&hellip;</a>
            </div>
        </div>
        {{ render_reference_request_review_status_pill(request) }}
        <small>{{ request.event.admin_unit.name }}</small>
    </li>
{% endfor %}
</ul>

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

{% endblock %}