PIbd-21_Balberova_D.N._Sush.../SushiBar/SushiBarClientApp/Views/Home/Mails.cshtml
2023-05-02 17:43:48 +04:00

64 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using SushiBarContracts.ViewModels
@model List<MessageInfoViewModel>
@{
ViewData["Title"] = "Mails";
}
<div class="text-center">
<h1 class="display-4">Письма</h1>
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<table class="table">
<thead>
<tr>
<th>
Дата письма
</th>
<th>
Заголовок
</th>
<th>
Текст
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.DateDelivery)
</td>
<td>
@Html.DisplayFor(modelItem => item.Subject)
</td>
<td>
@Html.DisplayFor(modelItem => item.Body)
</td>
</tr>
}
</tbody>
</table>
<p>с. @ViewBag.Page</p>
<a href="@Url.Action("Mails", new { page = ViewBag.Page - 1 > 1 ? ViewBag.Page - 1 : 1 })"
class="btn btn-primary">
Назад
</a>
<a href="@Url.Action("Mails", new { page = ViewBag.Page + 1 })"
class="btn btn-primary">
Вперед
</a>
}
</div>