<!DOCTYPE html>
<html lang="it">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Articoli</title>
</head>
<body>
    <div class="container">
        <h1>Elenco Articoli</h1>

        @if($articoli->isEmpty())
            <p>Nessun articolo trovato.</p>
        @else
            <table class="table">
                <thead>
                    <tr>
                        <th>Id</th>
                        <th>Id Articolo</th>
                        <th>EAN13</th>
                        <th>Titolo</th>
                        <th>Autori</th>
                        <th>Argomenti</th>
                        <th>Prezzo Ivato</th>
                        <th>Data di Pubblicazione</th>
                        <th>Enabled</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach($articoli as $articolo)
                        <tr>
                            <td>{{ $articolo->Id }}</td>
                            <td>{{ $articolo->IdArticolo }}</td>
                            <td>{{ $articolo->Ean13 }}</td>
                            <td>{{ $articolo->Titolo }}</td>
                            <td>{{ $articolo->ListaAutori }}</td>
                            <td>{{ $articolo->ListaArgomenti }}</td>
                            <td>{{ $articolo->PrezzoIvato }}</td>
                            <td>{{ $articolo->DataPubblicazione }}</td>
                            <td>{{ $articolo->Enabled ? 'Sì' : 'No' }}</td>
                        </tr>
                    @endforeach
                </tbody>
            </table>
        @endif
    </div>
</body>
</html>