chore: render table from fake data

This commit is contained in:
surtur 2020-11-05 21:53:24 +01:00
parent 434bac6886
commit f916b0c396
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -11,22 +11,24 @@
if (Model?.Carousels != null && Model.Carousels.Count > 0) {
<table style="width:100%">
<tr>
<th>@Html.DisplayNameFor(model => model.Carousels[0].id)</th>
<th>@Html.DisplayNameFor(model => model.Carousels[0].DataTarget)</th>
<th>@Html.DisplayNameFor(model => model.Carousels[0].ImageSrc)</th>
<th>@Html.DisplayNameFor(model => model.Carousels[0].ImageAlt)</th>
<th>@Html.DisplayNameFor(model => model.Carousels[0].CarouselContent)</th>
</tr>
<tr>
<td>fnksnjksd</td>
<td>mvdnskjr</td>
<td>8797321</td>
</tr>
<tr>
<td>jfdsjfds</td>
<td>nkjfdndf</td>
<td>645</td>
<th class="col-sm-1">@Html.DisplayNameFor(model => model.Carousels[0].id)</th>
<th class="col-sm-2">@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-2">@Html.DisplayNameFor(model => model.Carousels[0].CarouselContent)</th>
</tr>
@{
foreach (var carousel_item in Model.Carousels)
{
<tr>
<td class="col-sm-1">@carousel_item.id</td>
<td class="col-sm-2">@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-2">@carousel_item.CarouselContent</td>
</tr>
}
}
</table>
}
else