52 lines
855 B
Plaintext
52 lines
855 B
Plaintext
|
@using SchoolAgainStudyContracts.ViewModel;
|
||
|
|
||
|
@model List<MaterialViewModel>
|
||
|
|
||
|
@{
|
||
|
ViewData["Title"] = "Home Page";
|
||
|
}
|
||
|
|
||
|
<div class="text-center">
|
||
|
<h1 class="display-4">Материалы</h1>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div class="text-center">
|
||
|
@{
|
||
|
if (Model == null)
|
||
|
{
|
||
|
<h3 class="display-4">Авторизируйтесь</h3>
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
<p>
|
||
|
<a asp-action="CreateMaterial">Создать материал</a>
|
||
|
</p>
|
||
|
<table class="table">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>
|
||
|
Название
|
||
|
</th>
|
||
|
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
@foreach (var item in Model)
|
||
|
{
|
||
|
<tr>
|
||
|
<td>
|
||
|
@Html.DisplayFor(modelItem => item.Title)
|
||
|
</td>
|
||
|
<td>
|
||
|
<a href="@Url.Action("MaterialSetting","Home", new {id=item.Id })"
|
||
|
class="btn btn-primary btn-lg">U</a>
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
}
|
||
|
</div>
|