@page
@model Server.Pages.Panel.Stores.IndexModel
@{
}

<div class="my-2 float-end">
    <a class="btn btn-primary" asp-page="Create">@(Resources.ButtonCaptions.Create)</a>
</div>
<table class="table table-hover">
    <thead>
        <tr>
            @(Html.Ub_DisplayStringWithTh(Resources.DataDictionary.Name))
            @(Html.Ub_DisplayStringWithTh(Resources.DataDictionary.Address))
            @(Html.Ub_DisplayStringWithTh(Resources.DataDictionary.Mobile))
            @(Html.Ub_DisplayStringWithTh(Resources.DataDictionary.Score))
            @(Html.Ub_DisplayStringWithTh(Resources.DataDictionary.IsActive))
            <th scope="col"></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model.store)
        {
            <tr>
                @(Html.Ub_DisplayStringWithTd(item.Name))
                @(Html.Ub_DisplayStringWithTd(item.Address))
                @(Html.Ub_DisplayStringWithTd(item.Mobile))
                @(Html.Ub_DisplayInteger(item.Score))
                @(Html.Ub_DisplayBooleanWithTd(item.IsActive))
                <td>
                    <div class="btn-group" role="group" aria-label="Basic example">
                        <a asp-page="Update" asp-route-Id="@(item.Id)" class="btn btn-warning">@(Resources.ButtonCaptions.Edit)</a>
                        <a asp-page="Delete" asp-route-Id="@(item.Id)" class="btn btn-danger">@(Resources.ButtonCaptions.Delete)</a>
                    </div>
                </td>
            </tr>
        }
    </tbody>
</table>