@model pointMaster.Controllers.PosterController.RundeViewModel
@{
    ViewData["Title"] = "Poster";
}

<div>
    <h1>Poster</h1>
    <a asp-action="Create" asp-controller="Poster" class="btn btn-primary">Opret Post</a>
    <a asp-action="Poster" asp-controller="Print" class="ms-4 btn btn-secondary">Print poster</a>
    <table class="table table-striped">
        <thead>
            <tr>
                <th scope="col">Navn</th>
                <th scope="col">Beskrivelse</th>
                <th scope="col">Lokation</th>
                <th scope="col"></th>
            </tr>
        </thead>
        <tbody>
            @foreach (var round in Model.Rounds)
            {
                <tr>
                    <td scope="row" class="align-middle">@round.Name</td>
                    <td scope="row" class="align-middle">@round.Description</td>
                    <td scope="row" class="align-middle">@round.Location</td>
                    <td scope="row" class="d-flex justify-content-end">
                        <a asp-action="SletPost" asp-route-id="@round.Id" class="btn btn-danger">Slet post</a>
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>