summaryrefslogtreecommitdiff
path: root/Views/Figure/Details.cshtml
blob: 3bb43eada191b28138e8286297ee7dae8d3e38e8 (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 MyDarling.Models.Figure

<!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="container">
        <div class="row row-cols-xl-3 row-cols-md-2 justify-content-center mt-3">
            <div class="col">
                <div class="thumbnail">
                    @{
                        var filePath = $"/Content/{Model.ProductId}/{Model.Id}.jpg";
                    }
                    <a href="@filePath">
                        <img src="@filePath" class="img-thumbnail img-fluid" alt="@Model.Description">
                    </a>
                </div>
                <form asp-action="Edit" asp-route-id="@Model.Id" method="post" class="m-2">
                    <div asp-validation-summary="All"></div>
                    <div class="form-group">
                        <label asp-for="Description" class="form-label">Описание:</label>
                        @Html.TextAreaFor(model => model.Description, new { @class="form-control", @rows = 2 })
                    </div>
                    <button type="submit" class="btn btn-outline-success mt-3">Сохранить</button>
                    <button asp-action="Delete" asp-route-id="@Model.Id" method="post"
                        class="btn btn-outline-danger mt-3">Удалить</button>
                </form>
            </div>
        </div>
    </div>
</body>

</html>