errors.html 66 lignes · 2586 octets
{% extends "base.html" %}

{% block title %}{{ page_title }}{% endblock %}

{% block navbar %}
{% include "components/navbar.html" %}
{% endblock %}

{% block content %}
<div class="container mx-auto px-4 py-4">
    <!-- Breadcrumb -->
    <div class="text-sm breadcrumbs mb-3">
        <ul>
            <li><a href="/">{{ breadcrumb_home }}</a></li>
            <li><a href="/admin">{{ breadcrumb_admin }}</a></li>
            <li>{{ breadcrumb_errors }}</li>
        </ul>
    </div>

    <h1 class="text-2xl font-bold mb-4">{{ title }}</h1>
    <p class="text-base-content/70 mb-6">{{ description }}</p>

    <!-- Error Codes Table -->
    <div class="overflow-x-auto">
        <table class="table table-zebra w-full">
            <thead>
                <tr>
                    <th>{{ table_code }}</th>
                    <th>{{ table_description }}</th>
                    <th>{{ table_category }}</th>
                    <th>{{ table_middleware }}</th>
                    <th>{{ table_context }}</th>
                    <th>{{ table_example }}</th>
                </tr>
            </thead>
            <tbody>
                {% for error in error_codes %}
                <tr>
                    <td><code class="badge badge-error">{{ error.code }}</code></td>
                    <td>{{ error.description }}</td>
                    <td><span class="badge badge-outline">{{ error.category }}</span></td>
                    <td><code class="text-xs">{{ error.middleware }}</code></td>
                    <td class="text-sm text-base-content/70">{{ error.context }}</td>
                    <td class="text-sm text-base-content/70">{{ error.example }}</td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>

    <!-- Legend -->
    <div class="mt-6 card bg-base-200">
        <div class="card-body">
            <h2 class="card-title text-lg">{{ legend_title }}</h2>
            <ul class="list-disc list-inside space-y-2 text-sm">
                <li><strong>{{ table_code }}</strong> : {{ legend_code }}</li>
                <li><strong>{{ table_description }}</strong> : {{ legend_description }}</li>
                <li><strong>{{ table_category }}</strong> : {{ legend_category }}</li>
                <li><strong>{{ table_middleware }}</strong> : {{ legend_middleware }}</li>
                <li><strong>{{ table_context }}</strong> : {{ legend_context }}</li>
                <li><strong>{{ table_example }}</strong> : {{ legend_example }}</li>
            </ul>
        </div>
    </div>
</div>
{% endblock %}