83 lines
1.6 KiB
Plaintext
83 lines
1.6 KiB
Plaintext
@using TaskTrackerContracts.ViewModels
|
|
@model List<ProjectViewModel>
|
|
@{
|
|
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-controller="Project" asp-action="CreateProject">Создать проект</a>
|
|
</p>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
Номер
|
|
</th>
|
|
<th>
|
|
Имя проекта
|
|
</th>
|
|
<th>
|
|
Статус
|
|
</th>
|
|
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in Model)
|
|
{
|
|
<tr>
|
|
|
|
|
|
<td id="id">
|
|
@Html.DisplayFor(modelItem =>
|
|
item.Id)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem =>
|
|
item.Name)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem =>
|
|
item.State)
|
|
</td>
|
|
<td>
|
|
|
|
<form action="/Project/DeleteProject" method="post">
|
|
<input type="hidden" name="id" value="@item.Id" />
|
|
<button type="submit" class="btn btn-danger">Удалить</button>
|
|
</form>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
<form action="/Project/UpdateProject">
|
|
<input type="hidden" name="id" value="@item.Id" />
|
|
<button type="submit" class="btn btn-danger">Изменить</button>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
|
|
<form action="/Home/Tasks" method="post">
|
|
<input type="hidden" name="id" value="@item.Id" />
|
|
<button type="submit" class="btn btn-danger">Задачи</button>
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
</div>
|