CourseWork/University/UniversityClientApp/Views/Home/Teachers.cshtml

82 lines
2.1 KiB
Plaintext
Raw Normal View History

2024-05-26 23:51:13 +04:00
@using UniversityContracts.ViewModels
@model List<TeacherViewModel>
@{
ViewData["Title"] = "Manage Teachers";
}
<div class="text-center">
<h2 class="display-4">@ViewData["Title"]</h2>
</div>
<form method="post">
<div class="row">
<div class="col-4">Name:</div>
<div class="col-8">
<input type="text" name="name" id="name" class="form-control" />
</div>
</div>
<div class="row">
<div class="col-4">Academic Degree:</div>
<div class="col-8">
<input type="text" name="academicDegree" id="academicDegree" class="form-control" />
</div>
</div>
<div class="row">
<div class="col-4">Position:</div>
<div class="col-8">
<input type="text" name="position" id="position" class="form-control" />
</div>
</div>
<div class="row">
<div class="col-4">Disciplines:</div>
<div class="col-8">
<select id="disciplines" name="disciplines" class="form-control" multiple asp-items="ViewBag.Disciplines"></select>
</div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4">
<input type="submit" value="Create Teacher" class="btn btn-primary" />
</div>
</div>
</form>
<table class="table">
<thead>
<tr>
2024-05-26 23:51:13 +04:00
<th>Id</th>
<th>Name</th>
<th>Academic Degree</th>
<th>Position</th>
<th>Disciplines</th>
</tr>
</thead>
2024-05-26 23:51:13 +04:00
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
2024-05-26 23:51:13 +04:00
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
2024-05-26 23:51:13 +04:00
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.AcademicDegree)
</td>
<td>
@Html.DisplayFor(modelItem => item.Position)
</td>
<td>
</td>
</tr>
2024-05-26 23:51:13 +04:00
}
</tbody>
</table>