{% extends "base.html.j2" %}
{% from 'bootstrap5/form.html' import render_form %}
{% from "tables.html.j2" import groups_table, mirrorlists_table, proxies_table %}

{% block content %}
    <h1 class="h2 mt-3">Resource Pool</h1>
    <h2 class="h3">{{ pool.pool_name }}</h2>

    <div style="border: 1px solid #666;" class="p-3">
        {{ render_form(form) }}
    </div>

    <h3>Groups</h3>
    <p><a href="{{ url_for("portal.pool.pool_group_add", pool_id=pool.id) }}" class="btn btn-sm btn-success">Add Group</a></p>
    {{ groups_table(pool.groups, pool) }}

    <h3>Distribution Lists</h3>
    {{ mirrorlists_table(pool.lists) }}

    <h3>Simple Proxies</h3>
    {{ proxies_table(pool.proxies) }}
{% endblock %}
