Files
marechai/Marechai/Areas/Admin/Views/ResolutionsByScreen/Index.cshtml

55 lines
1.4 KiB
Plaintext

@model IEnumerable<Marechai.Database.Models.ResolutionsByScreen>
@{
ViewData["Title"] = "Index";
}
<h1>Resolutions by screen</h1>
<p>
<a asp-action="Create" class="btn btn-primary">
Create new
</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Screen)
</th>
<th>
@Html.DisplayNameFor(model => model.Resolution)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@if (item.Screen.NativeResolution != null)
{
@($"{item.Screen.Diagonal}\" {item.Screen.Type} with {item.Screen.NativeResolution}")
}
else
{
@($"{item.Screen.Diagonal}\" {item.Screen.Type}")
}
</td>
<td>
@item.Resolution.ToString()
</td>
<td>
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">
Details
</a>
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">
Edit
</a>
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">
Delete
</a>
</td>
</tr>
}
</tbody>
</table>