SurveyVista/Web/Areas/Admin/Views/Footer/Index.cshtml
2024-04-05 17:27:17 +02:00

81 lines
2.8 KiB
Text

@model IEnumerable<ShowViewModel>
@{
ViewData["Title"] = "Index";
}
<div class="container mt-5">
<partial name="_Notification" />
<div class="card bg-default mb-3 ">
<div class="card-header">Footers</div>
<div class="card-body">
<h4 class="card-title">Footer list</h4>
<p>
<a asp-action="Create" class="btn btn-primary">Create New</a>
</p>
<table class="table table-responsive w-100 d-block d-md-table">
<thead class="w-auto">
<tr>
<th scope="col">Id</th>
<th scope="col">Title</th>
<th scope="col">Name</th>
<th scope="col">Owner</th>
<th scope="col">Created By</th>
<th scope="col">Social Media</th>
<th scope="col" class="d-flex justify-content-end">Action</th>
</tr>
</thead>
<tbody class="w-auto">
@foreach (var item in Model)
{
<tr class=" table-secondary">
<td>@item.Id</td>
<td>@item.Title</td>
<td>@item.Name</td>
<td>@item.Owner</td>
<td>@item.CreatedBy</td>
<td>
<fieldset>
<legend></legend>
@foreach (var option in item.SocialMediaOptions)
{
<input type="checkbox" name="SelectedSocialMediaIds" value="@option.Value" disabled
@(item.SelectedSocialMediaIds != null && item.SelectedSocialMediaIds.Contains(int.Parse(option.Value)) ? "checked":"")>
@option.Text
<br>
}
</fieldset>
</td>
<td class="d-flex justify-content-end">
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger btn-m"><i class="bi bi-trash"></i> Delete</a> |
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-warning btn-m"><i class="bi bi-pencil-square"></i> Edit</a>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
</div>