@model pointMaster.Controllers.PointViewModel;
@{
    ViewData["Title"] = "Point";
}
<a asp-action="GivPoint" asp-controller="Point" class="btn btn-primary">Giv point</a>
<table class="table table-striped">
    <thead>
        <tr>
            <th scope="col">Patrulje</th>
            <th scope="col">Post</th>
            <th scope="col">Point</th>
            <th scope="col">Turnout</th>
            @if (Model.AllowedToDelete) {
                <th scope="col"></th>
            }
        </tr>
    </thead>
    <tbody>
        @foreach (var point in Model.points)
        {
            <tr>
                <td scope="row">@point.Patrulje.Name</td>
                <td scope="row">@point.Poster.Name</td>
                <td scope="row">@point.Points</td>
                <td scope="row">@point.Turnout</td>
                @if (Model.AllowedToDelete) {
                    <td scope="row"><a asp-action="DeletePoint" asp-controller="Point" asp-route-id="@point.Id" class="btn btn-danger">Slet point</a></td>
                }
            </tr>
        }
    </tbody>
</table>