43 lines
1.8 KiB
Plaintext
43 lines
1.8 KiB
Plaintext
@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> |