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

60 lines
1.5 KiB
Plaintext

@using Cicm.Database.Models
@model IEnumerable<Cicm.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(ResolutionsByScreen 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>