70 lines
1.2 KiB
Plaintext
70 lines
1.2 KiB
Plaintext
|
@using SchoolAgainStudyContracts.ViewModel;
|
||
|
|
||
|
@model List<LessonViewModel>
|
||
|
|
||
|
@{
|
||
|
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="CreateLesson">Создать занятие</a>
|
||
|
</p>
|
||
|
<table class="table">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>
|
||
|
Название
|
||
|
</th>
|
||
|
<th>
|
||
|
Дата проведения
|
||
|
</th>
|
||
|
<th>
|
||
|
Изделие
|
||
|
</th>
|
||
|
<th>
|
||
|
Материалы
|
||
|
</th>
|
||
|
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
@foreach (var item in Model)
|
||
|
{
|
||
|
<tr>
|
||
|
<td>
|
||
|
@Html.DisplayFor(modelItem => item.Title)
|
||
|
</td>
|
||
|
<td>
|
||
|
@Html.DisplayFor(modelItem => item.DateEvent)
|
||
|
</td>
|
||
|
<td>
|
||
|
@Html.DisplayFor(modelItem => item.ProductName)
|
||
|
</td>
|
||
|
<td>
|
||
|
<select asp-items="@(new SelectList(item.LessonMaterials,"Key", "Value.Title"))"></select>
|
||
|
</td>
|
||
|
<td>
|
||
|
<a href="@Url.Action("LessonSetting","Home", new {id=item.Id })"
|
||
|
class="btn btn-primary btn-lg">U</a>
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
}
|
||
|
</div>
|