LocalGovIMS_localgov-ims/src/Admin/Views/Role/List.cshtml
@model IList<Admin.Models.Role.DetailsViewModel>
@{
    ViewBag.Title = "Roles";
}

@section Header { Roles }

@section Subheader { Role maintenance }

@if (Model != null)
{
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover mt-2">
            <thead>
                <tr>
                    <th scope="col">
                        Name
                    </th>
                    <th scope="col">
                        Display name
                    </th>
                    <th scope="col">
                        <span class="visually-hidden">Actions</span>
                    </th>
                </tr>
            </thead>
            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        @Html.DisplayFor(m => item.Name)
                    </td>
                    <td>
                        @Html.DisplayFor(m => item.DisplayName)
                    </td>
                    <td class="text-end">
                        @Html.ActionLink("View", "Details", new { id = item.Id }, new { @class = "btn btn-secondary" })
                        @Html.ActionLink("Edit", "Edit", new { id = item.Id }, new { @class = "btn btn-secondary" })
                    </td>
                </tr>
            }
        </table>
    </div>
}
else
{
    Html.RenderPartial("_NothingSpecified", "roles");
}
