@Master['master.html']
@Model['IndexViewModel']
@Section['Content']
<form class="mt-3" method="post">
    <div class="row mt-2">
        <h3>
            Benutzer
            <small class="text-muted">Bearbeiten von Benutzerrechten</small>
        </h3>
    </div>

    <nav class="navbar navbar-expand-lg navbar-light bg-light">
        <span class="form-inline col-lg-12">
            <input class="form-control mr-sm-2 col-lg-11" type="search" placeholder="" id="SearchText" name="SearchText" value="@!Model.SearchText" aria-label="Search">
            <button class="btn btn-outline-success my-2 my-sm-0" type="submit"><img src="/static/iconic/svg/magnifying-glass.svg" style="width:16px;height:16px;fill:white;stroke:white" alt="magnifying class"></button>
        </span>
        <p></p>
    </nav>

    <div class="list-group">
        @Each.Users
        <div class="list-group-item list-group-item-action">
            <div class="d-flex w-100 justify-content-between">
                <h5 class="mb-1">@Current.Login</h5>
            </div>
            <div class="d-flex w-100 justify-content-end">
                <a href="/Config/EditUser?Id=@Current.Id" class="btn btn-success"><img class="iconic" src="/static/iconic/svg/wrench.svg" style="width:16px;height:16px;fill:white;stroke:white" alt="wrench">&nbsp;Bearbeiten</a>
            </div>
            <p class="mb-1">Letzter Login: @Current.LastLogonAtHumanReadable</p>
        </div>
        @EndEach
    </div>

    <div class="row mt-2">
        <nav aria-label="Page navigation example">
            <ul class="pagination">
                <li class="page-item @IfNot.IsPrevPageEnabled disabled @EndIf"><button class="page-link" type="submit" id="PrevPage" name="PrevPage" value="True">Vorherige Seite</button></li>
                @Each.AvailablePages
                <li class="page-item @If.IsActive active @EndIf"><button class="page-link" type="submit" id="Page" name="Page" value="@Current.PageNo">@Current.PageNo</button></li>
                @EndEach
                <li class="page-item @IfNot.IsNextPageEnabled disabled @EndIf"><button class="page-link" type="submit" id="NextPage" name="NextPage" value="True">Nächste Seite</button></li>
            </ul>
        <input type="hidden" id="CurrentPage" name="CurrentPage" value="@!Model.CurrentPage" />
        </nav>
    </div>
</form>
@EndSection
