SurveyVista/Web/Areas/Admin/Views/Banner/Index.cshtml
2024-02-22 16:46:42 +01:00

66 lines
1.8 KiB
Text

@model IEnumerable<BannerViewModel>
@{
ViewData["Title"] = "Index";
}
<div class="container">
<partial name="_Notification"/>
<div class="card text-white bg-info mb-3 justify-content-center">
<div class="card-header">Banners</div>
<div class="card-body">
<h4 class="card-title">Banner list</h4>
<p>
<a asp-action="Create" class="btn btn-primary">Create New</a>
</p>
<table class="table table-hover table-responsive">
<thead>
<tr>
<th scope="col">Id</th>
<th scope="col">Title</th>
<th scope="col">Description</th>
<th scope="col">Link Url</th>
<th scope="col" class="d-flex justify-content-end">Action</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr class="table-secondary">
<td>@item.Id</td>
<td> <span class="badge bg-primary">@item.Title</span></td>
<td>@item.Description</td>
<td>@item.LinkUrl</td>
<td class="d-flex justify-content-end">
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger"><i class="bi bi-trash"></i> Delete</a> |
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-warning"><i class="bi bi-pencil-square"></i> Edit</a>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
</div>