{% extends "layout.html" %}
{% set active_id = "verification_requests_incoming" %}
{% from "_macros.html" import render_verification_request_review_status_pill, render_pagination %}
{%- block title -%}
{{ _('Incoming verification requests') }}
{%- endblock -%}
{% block content %}

<h1 class="mb-1">{{ _('Incoming verification requests') }}</h1>

<ul class="list-group mt-4">
{% for request in requests %}
    <li class="list-group-item">
        <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.source_admin_unit.name }}</button>
            <div class="dropdown-menu">
                <a class="dropdown-item" href="{{ url_for('admin_unit_verification_request_review_status', id=request.id) }}">{{ _('Show review status') }}</a>
                <a class="dropdown-item" href="{{ url_for('admin_unit_verification_request_review', id=request.id) }}">{{ _('Review request') }}&hellip;</a>
                <a class="dropdown-item" href="{{ url_for('organizations', path=request.source_admin_unit_id) }}">{{ _('View organization') }}&hellip;</a>
            </div>
        </div>
        {{ render_verification_request_review_status_pill(request) }}
    </li>
{% endfor %}
</ul>

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

{% endblock %}