добавила представление для вывода всех писем в веб
This commit is contained in:
parent
1c676ba332
commit
91517adda9
@ -6,6 +6,10 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="Views\Home\Mails.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
@ -18,4 +22,16 @@
|
||||
<ProjectReference Include="..\SushiBarContracts\SushiBarContracts.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<UpToDateCheckInput Remove="Views\Home\Mails.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_ContentIncludedByDefault Remove="Views\Home\Mails.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Views\Home\Mails.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
51
SushiBarClientApp/Views/Home/Mails.cshtml
Normal file
51
SushiBarClientApp/Views/Home/Mails.cshtml
Normal file
@ -0,0 +1,51 @@
|
||||
@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>
|
||||
}
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user