{% extends 'layouts/admin.twig' %}

{% block content %}
    <ul class="breadcrumbs el">
        <li><a href="/admin/">Admin</a> /</li>
        <li class="end">Site Readiness</li>
    </ul>

    <h1>{{ title }}</h1>

    <p class="readiness-summary">
        <strong>{{ summary.ok }}</strong> OK ·
        <strong>{{ summary.warn }}</strong> warnings ·
        <strong>{{ summary.fail }}</strong> problems
    </p>

    {% for group_name, checks in groups %}
        <div class="ordersection el">
            <h2>{{ group_name }}</h2>
            <table class="detailsTable" width="100%">
                {% for check in checks %}
                    <tr class="readiness-{{ check.status.value }}">
                        <td width="40">
                            {% if check.status.value == 'ok' %}<i class="fa fa-check" style="color:green"></i>
                            {% elseif check.status.value == 'warn' %}<i class="fa fa-exclamation-triangle" style="color:#e8a000"></i>
                            {% elseif check.status.value == 'fail' %}<i class="fa fa-times" style="color:#d00"></i>
                            {% else %}<i class="fa fa-minus" style="color:#999"></i>{% endif %}
                        </td>
                        <td><strong>{{ check.label }}</strong><br><small>{{ check.detail }}</small></td>
                        <td><small>{{ check.hint }}</small></td>
                    </tr>
                {% endfor %}
            </table>
        </div>
    {% endfor %}
{% endblock %}
