summaryrefslogtreecommitdiff
path: root/Views/Products/Index.cshtml
blob: 4c624b8366f46a712c757e6898dd134c33a66835 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@model IQueryable<MyDarling.Models.Product>

<!DOCTYPE html>
<html>

<head>
    <title>Продукты</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>