71 lines
3.3 KiB
HTML
71 lines
3.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{default}">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Пользователи</title>
|
|
</head>
|
|
|
|
<body>
|
|
<main class="text-center" layout:fragment="content">
|
|
<span class="mainSt">
|
|
<b>Пользователи</b>
|
|
</span>
|
|
<div>
|
|
<a href="/users/edit/" class="btn btn-danger">Добавить пользователя</a>
|
|
</div>
|
|
<div class="d-flex justify-content-right">
|
|
<a href="/admin/users/statistic/" class="btn btn-link">
|
|
<i class="fa fa-file-earmark-bar-graph">Статистика</i>
|
|
</a>
|
|
</div>
|
|
<th:block th:switch="${items.size()}">
|
|
<h2 th:case="0">Данные отсутствуют</h2>
|
|
<th:block th:case="*">
|
|
<table class="table">
|
|
<caption></caption>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="w-5">ID</th>
|
|
<th scope="col" class="w-10">Логин</th>
|
|
<th scope="col" class="w-25">Роль</th>
|
|
<th scope="col" class="w-50">Кафедра</th>
|
|
<th scope="col" class="w-10"></th>
|
|
<th scope="col" class="w-10"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr th:each="user : ${items}">
|
|
<th scope="row" th:text="${user.id}"></th>
|
|
<td th:text="${user.login}"></td>
|
|
<td th:text="${user.role}"></td>
|
|
<td th:text="${user.departmentName}"></td>
|
|
<td>
|
|
<form th:action="@{/users/edit/{id}(id=${user.id})}" method="get">
|
|
<button type="submit" class="btn btn-link button-link">
|
|
<i class="fa fa-edit">Изменить</i>
|
|
</button>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<form th:action="@{/users/delete/{id}(id=${user.id})}" method="post">
|
|
<button type="submit" class="btn btn-link button-link"
|
|
onclick="return confirm('Вы уверены?')">
|
|
<i class="fa fa-trash">Удалить</i>
|
|
</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</th:block>
|
|
<th:block th:replace="~{ pagination :: pagination (
|
|
url=${'users'},
|
|
totalPages=${totalPages},
|
|
currentPage=${currentPage}) }" />
|
|
</th:block>
|
|
</main>
|
|
</body>
|
|
|
|
</html> |