Files
isn/src/isnd/Views/ApiKeys/Index.cshtml
Paul Schneider 476d35ae8a refact
2021-07-05 12:55:52 +01:00

55 lines
1.5 KiB
Plaintext

@model isn.Data.ApiKeys.IndexModel
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-controller="ApiKeys" asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.ApiKey[0].User)
</th>
<th>
@Html.DisplayNameFor(model => model.ApiKey[0].Name)
</th>
<th>
@Html.DisplayNameFor(model => model.ApiKey[0].CreationDate)
</th>
<th>
@Html.DisplayNameFor(model => model.ApiKey[0].ValidityPeriodInDays)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.ApiKey) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.User.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.CreationDate)
</td>
<td>
@Html.DisplayFor(modelItem => item.ValidityPeriodInDays)
</td>
<td>
<a asp-controller="ApiKeys" asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-controller="ApiKeys" asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-controller="ApiKeys" asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>