0
0
MyDarling/Views/Products/Index.cshtml

43 lines
1.5 KiB
Plaintext
Raw Normal View History

2023-06-03 07:41:46 +03:00
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@model IQueryable<MyDarling.Models.Product>
<!DOCTYPE html>
<html>
<head>
<title>My Darling Underwear</title>
<link href="/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
</head>
<body>
<nav class="navbar navbar-dark bg-primary">
<a class="navbar-brand mx-4" href="/Products"><img height="30" src="/assets/img/logo.svg"></a>
<a href="/Account/logout"><button class="btn btn-outline-light mx-4">Выйти</button></a>
</nav>
<div class="row container-fluid justify-content-center row-cols-xl-2">
<div class="col">
<table class="table">
<thead>
<tr>
<th scope="col">Название</th>
<th scope="col">Описание</th>
<th scope="col">Цена</th>
</tr>
</thead>
<tbody>
@foreach (var bundle in Model)
{
<tr>
<td><a asp-action="Details" asp-route-id="@bundle.Id">@bundle.Name</a></td>
<td>@bundle.Description</td>
<td>@bundle.Price</td>
</tr>
}
</tbody>
</table>
<a asp-action="Create"><button class="btn btn-primary">Добавить</button></a>
</div>
</div>
</body>
</html>