51 lines
2.3 KiB
HTML
51 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{default}">
|
|
|
|
<head>
|
|
<title>Списки рассылки</title>
|
|
</head>
|
|
|
|
<body>
|
|
<main layout:fragment="content">
|
|
<th:block th:switch="${items.size()}">
|
|
<h2 th:case="0">Данные отсутствуют</h2>
|
|
<th:block th:case="*">
|
|
<h2>Списки рассылки</h2>
|
|
<div>
|
|
<a href="/admin/subscription/edit/" class="btn btn-secondary">Добавить список рассылки</a>
|
|
</div>
|
|
<table class="table">
|
|
<caption></caption>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="w-10">ID</th>
|
|
<th scope="col" class="w-auto">Список рассылки</th>
|
|
<th scope="col" class="w-10"></th>
|
|
<th scope="col" class="w-10"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr th:each="subscription : ${items}">
|
|
<th scope="row" th:text="${subscription.id}"></th>
|
|
<td th:text="${subscription.name}"></td>
|
|
<td>
|
|
<form th:action="@{/admin/subscription/edit/{id}(id=${subscription.id})}" method="get">
|
|
<button type="submit" class="btn btn-link button-link">Редактировать</button>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<form th:action="@{/admin/subscription/delete/{id}(id=${subscription.id})}"
|
|
method="post">
|
|
<button type="submit" class="btn btn-link button-link"
|
|
onclick="return confirm('Вы уверены?')">Удалить</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</th:block>
|
|
</th:block>
|
|
</main>
|
|
</body>
|
|
|
|
</html> |