Отчёт.

This commit is contained in:
Programmist73 2023-05-26 18:44:06 +04:00
parent 6d178b58aa
commit d75c758ee1
5 changed files with 111 additions and 203 deletions

View File

@ -38,27 +38,5 @@
</div>
</form>
</div>
<!--<div layout:fragment="content">
<div th:text="${errors}" class="margin-bottom alert-danger"></div>
<form action="#" th:action="@{/student/{id}(id=${id})}" th:object="${studentDto}" method="post">
<div class="mb-3">
<label for="firstName" class="form-label">Имя</label>
<input type="text" class="form-control" id="firstName" th:field="${studentDto.firstName}" required="true">
</div>
<div class="mb-3">
<label for="lastName" class="form-label">Фамилия</label>
<input type="text" class="form-control" id="lastName" th:field="${studentDto.lastName}" required="true">
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary button-fixed">
<span th:if="${id == null}">Добавить</span>
<span th:if="${id != null}">Обновить</span>
</button>
<a class="btn btn-secondary button-fixed" th:href="@{/student}">
Назад
</a>
</div>
</form>
</div>-->
</body>
</html>

View File

@ -8,7 +8,7 @@
<link rel="stylesheet" href="/css/modal-nation.css"/>
</head>
<body>
<div layout:fragment="content">
<div layout:fragment="content">
<form action="#" th:action="@{/nation/{id}(id=${id})}" th:object="${fullNationDTO}" method="get">
<div th:each="tank, iterator: ${fullNationDTO.tanks}">
<div class="nation-card">
@ -19,28 +19,6 @@
</div>
</div>
</form>
</div>
<!--<div layout:fragment="content">
<div th:text="${errors}" class="margin-bottom alert-danger"></div>
<form action="#" th:action="@{/student/{id}(id=${id})}" th:object="${studentDto}" method="post">
<div class="mb-3">
<label for="firstName" class="form-label">Имя</label>
<input type="text" class="form-control" id="firstName" th:field="${studentDto.firstName}" required="true">
</div>
<div class="mb-3">
<label for="lastName" class="form-label">Фамилия</label>
<input type="text" class="form-control" id="lastName" th:field="${studentDto.lastName}" required="true">
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary button-fixed">
<span th:if="${id == null}">Добавить</span>
<span th:if="${id != null}">Обновить</span>
</button>
<a class="btn btn-secondary button-fixed" th:href="@{/student}">
Назад
</a>
</div>
</form>
</div>-->
</body>
</html>

View File

@ -9,7 +9,7 @@
<script type="text/javascript" src="/webjars/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
<div layout:fragment="content">
<div layout:fragment="content">
<div class="Group_create_level">
<h1>Генератор наций</h1>
<h2>
@ -49,35 +49,7 @@
</div>
</div>
</div>
<!-- <div class="table-responsive">
<table class="table">
<tbody>
<tr th:each="nation, iterator: ${nations}">
<th scope="row" th:text="${iterator.index} + 1"/>
<td th:text="${nation.id}"/>
<td th:text="${nation.nation}" style="width: 60%"/>
<td style="width: 10%">
<div class="btn-group" role="group" aria-label="Basic example">
<a class="btn btn-warning button-fixed button-sm"
th:href="@{/nation/edit/{id}(id=${nation.id})}">
<i class="fa fa-pencil" aria-hidden="true"></i> Изменить
</a>
<button type="button" class="btn btn-danger button-fixed button-sm"
th:attr="onclick=|confirm('Удалить нацию?') && document.getElementById('remove-${nation.id}').click()|">
<i class="fa fa-trash" aria-hidden="true"></i> Удалить
</button>
</div>
<form th:action="@{/nation/delete/{id}(id=${nation.id})}" method="post">
<button th:id="'remove-' + ${nation.id}" type="submit" style="display: none">
Удалить
</button>
</form>
</td>
</tr>
</tbody>
</table>
</div> -->
</div>
</body>
<th:block layout:fragment="scripts">
</th:block>

View File

@ -9,7 +9,7 @@
<script type="text/javascript" src="/webjars/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
<div layout:fragment="content">
<div layout:fragment="content">
<div class="Group_create_level">
<h1>Генератор танков</h1>
<h2>
@ -72,26 +72,6 @@
</div>
</div>
</div>
</div>
</div>
</body>
<script>
$(document).ready(function() {
$('#filterStart').on('click', function() {
$.ajax({
url: "http://localhost:8080/api/tank/filteredList/?nation='
+escape(document.forms['filterForm'].elements['nation'].value)&
+escape(document.forms['filterForm'].elements['firstLevel'].value)&
+escape(document.forms['filterForm'].elements['secondLevel'].value)"
}).then(function (data) {
});
});
});
</script>
</html>
<!--
-->
<!--th:action="@{/tank/filteredList/{nation}(nation=${document.elements['nation'].value}){firstLevel}(firstLevel=${document.elements['firstLevel'].value}){secondLevel}(secondLevel=${document.elements['secondLevel'].value})}"-->