2024-05-27 23:53:45 +04:00
|
|
|
@using UniversityContracts.ViewModels
|
|
|
|
@model List<DisciplineViewModel>
|
2024-05-28 17:05:02 +04:00
|
|
|
@{
|
|
|
|
List<StudentViewModel> students = ViewBag.Students;
|
|
|
|
}
|
2024-05-27 23:53:45 +04:00
|
|
|
@{
|
2024-05-30 02:30:33 +04:00
|
|
|
ViewData["Title"] = "Управление дисциплинами";
|
2024-04-28 16:30:27 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
<h2 class="display-4">@ViewData["Title"]</h2>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<form method="post">
|
|
|
|
<div class="row">
|
2024-05-30 02:30:33 +04:00
|
|
|
<div class="col-4">Название:</div>
|
2024-04-28 16:30:27 +04:00
|
|
|
<div class="col-8">
|
|
|
|
<input type="text" name="name" id="name" class="form-control" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2024-05-30 02:30:33 +04:00
|
|
|
<div class="col-4">Описание:</div>
|
2024-04-28 16:30:27 +04:00
|
|
|
<div class="col-8">
|
|
|
|
<textarea name="description" id="description" class="form-control"></textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-05-27 23:53:45 +04:00
|
|
|
|
|
|
|
<div class="row">
|
2024-05-30 02:30:33 +04:00
|
|
|
<div class="col-4">Дата:</div>
|
2024-05-27 23:53:45 +04:00
|
|
|
<div class="col-8">
|
|
|
|
<input type="date" name="date" id="date" class="form-control" />
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-28 16:30:27 +04:00
|
|
|
<div class="row">
|
2024-05-30 02:30:33 +04:00
|
|
|
<div class="col-4">Преподаватель:</div>
|
2024-04-28 16:30:27 +04:00
|
|
|
<div class="col-8">
|
2024-05-27 23:53:45 +04:00
|
|
|
<select id="teacher" name="teacher" class="form-control" asp-items="@(new SelectList(@ViewBag.Teachers,"Id", "Name"))"></select>
|
2024-04-28 16:30:27 +04:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-05-27 23:53:45 +04:00
|
|
|
|
2024-05-28 17:05:02 +04:00
|
|
|
|
|
|
|
<div class="row">
|
2024-05-30 02:30:33 +04:00
|
|
|
<div class="col-4">Студенты:</div>
|
2024-05-28 17:05:02 +04:00
|
|
|
<div class="col-8">
|
2024-05-28 19:50:37 +04:00
|
|
|
<div class="scrollable-list">
|
|
|
|
@foreach (var student in students)
|
|
|
|
{
|
|
|
|
<div class="form-check">
|
|
|
|
<input class="form-check-input" type="checkbox" name="studentIds" value="@student.Id" id="student-@student.Id">
|
|
|
|
<label class="form-check-label" for="student-@student.Id">
|
|
|
|
@student.Name
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
</div>
|
2024-05-28 17:05:02 +04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2024-04-28 16:30:27 +04:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-8"></div>
|
|
|
|
<div class="col-4">
|
|
|
|
<input type="submit" value="Create Discipline" class="btn btn-primary" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2024-05-30 02:30:33 +04:00
|
|
|
<th>Имя</th>
|
|
|
|
<th>Описание</th>
|
|
|
|
<th>Дата</th>
|
|
|
|
<th>Имя учителя</th>
|
|
|
|
<th>Действие</th>
|
2024-04-28 16:30:27 +04:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2024-05-27 23:53:45 +04:00
|
|
|
@foreach (var item in Model)
|
2024-04-28 16:30:27 +04:00
|
|
|
{
|
|
|
|
<tr>
|
|
|
|
<td>
|
2024-05-27 23:53:45 +04:00
|
|
|
@Html.DisplayFor(modelItem => item.Id)
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => item.Name)
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => item.Date)
|
2024-04-28 16:30:27 +04:00
|
|
|
</td>
|
|
|
|
<td>
|
2024-05-27 23:53:45 +04:00
|
|
|
@Html.DisplayFor(modelItem => item.TeacherName)
|
2024-04-28 16:30:27 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
2024-05-27 23:53:45 +04:00
|
|
|
}
|
2024-04-28 16:30:27 +04:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|