<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous">
        </script>
    <link rel="stylesheet" href="/global.css">
    <link rel="stylesheet" href="/spolecne.css">
    <link rel="stylesheet" href="/redakce/prehled_clanku.css">
    <link rel="stylesheet" href="/redakce/spolecne_redakce.css">
    <title>Přehled článků</title>
</head>

<body>
    <%- include("../spolecne/hlavicka.ejs") -%>
    <%- include("redakce_spolecne/hlavicka.ejs") -%>
    <main>
        <table class="col-7 m-0-a">
            <tr>
                <th>ID</th>
                <th>Nadpis</th>
                <th colspan="2">Možnosti</th>
            </tr>
            <% for(i in clanky){ %>
                <tr>
                    <td><%= i %></td>   
                    <td><%= clanky[i].nadpis %></td>   
                    <td><a href="/redakce/upraveni_clanku/<%= i %>"><button id="edit_button">Upravit</button></a></td>   
                    <td><a href="/redakce/smazat/<%= i %>"><button id="delete_button">Smazat</button></a></td>   
                </tr>
            <% } %>
        </table>

    </main>
    <%- include("../spolecne/paticka.ejs") -%>
</body>

</html>