summaryrefslogtreecommitdiff
path: root/Views/Figure/Details.cshtml
blob: ace2a9a0ce26932768e1597dc73574baa6ad191e (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
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@model MyDarling.Models.Figure

<!DOCTYPE html>
<html>

<head>
    <title>Figure</title>
    <link href="/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
</head>

<body>
    <div class="row gx-4 gx-lg-5 row-cols-2 row-cols-md-3 row-cols-xl-4 justify-content-center">
        <div class="col mb-5">
            <div class="thumbnail h-100">
                <a href="@Model.FilePath">
                    <img src="@Model.FilePath" class="img-thumbnail img-fluid" alt="@Model.Description">
                </a>
            </div>
        </div>
    </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">Description:</label>
            @Html.TextAreaFor(model => model.Description, new { @class="form-control", @rows = 2 })
        </div>
        <button type="submit" class="btn btn-primary mt-3">Save</button>
        <button asp-action="Delete" asp-route-id="@Model.Id" method="post" class="btn btn-primary mt-3">Delete</button>
    </form>

</body>

</html>