All checks were successful
continuous-integration/drone/push Build is passing
site.js is already included in _Layout
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
@model CarouselViewModel
|
|
@{
|
|
ViewData["Title"] = "Carousel Select";
|
|
}
|
|
<h2>@ViewData["Title"]</h2>
|
|
<h3>@ViewData["Message"]</h3>
|
|
|
|
<p>Select all data from carousel.</p>
|
|
<br/>
|
|
<a asp-action="Create">Create new carousel item</a>
|
|
<br/><br/>
|
|
|
|
@{
|
|
if (Model?.Carousels != null && Model.Carousels.Count > 0) {
|
|
<table id="carousel_table" class="table table-responsive table-striped table-bordered">
|
|
<tr>
|
|
<th class="col-sm-1">@Html.DisplayNameFor(model => model.Carousels[0].id)</th>
|
|
<th class="col-sm-1">@Html.DisplayNameFor(model => model.Carousels[0].DataTarget)</th>
|
|
<th class="col-sm-2">@Html.DisplayNameFor(model => model.Carousels[0].ImageSrc)</th>
|
|
<th class="col-sm-2">@Html.DisplayNameFor(model => model.Carousels[0].ImageAlt)</th>
|
|
<th class="col-sm-4">@Html.DisplayNameFor(model => model.Carousels[0].CarouselContent)</th>
|
|
<th class="col-sm-1">Edit</th>
|
|
<th class="col-sm-1">Delete</th>
|
|
</tr>
|
|
@{
|
|
foreach (var carousel_item in Model.Carousels)
|
|
{
|
|
<tr>
|
|
<td class="col-sm-1">@carousel_item.id</td>
|
|
<td class="col-sm-1">@carousel_item.DataTarget</td>
|
|
<td class="col-sm-2">@carousel_item.ImageSrc</td>
|
|
<td class="col-sm-2">@carousel_item.ImageAlt</td>
|
|
<td class="col-sm-4">@carousel_item.CarouselContent</td>
|
|
<td class="col-sm-1"><a asp-action="Edit" asp-route-id="@carousel_item.id">Edit</a></td>
|
|
<td class="col-sm-1"><a asp-action="Delete" asp-route-id="@carousel_item.id" onclick="return item_deletion_confirmation();">Delete</a></td>
|
|
</tr>
|
|
}
|
|
}
|
|
</table>
|
|
}
|
|
else
|
|
{
|
|
<h2>Carousel is empty</h2>
|
|
}
|
|
}
|