blob: 59289093138c7fd020226df7f1b86fe0df72dea2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<div th:replace="~{common :: head}"></div>
<body>
<div th:replace="~{common :: page-header}"></div>
<div class="indent">
<form method="get" action="/newPartner">
<button id="newPartnerBtn" type="submit" class="btn btn-primary">Создать нового партнера</button>
</form>
<br>
<form method="get" action="/partners">
<table class="table">
<thead class="theme-dark">
<tr>
<th colspan="6">Фильтры</th>
</tr>
</thead>
<tbody>
<tr>
<td>Название</td>
<td>
<input type="text" id="partnerNameFilter" name="partnerName" th:value="${partnerNameFilter}">
</td>
</tr>
<tr>
<td>Тип</td>
<td>
<select id="partnerTypeFilter" name="partnerType">
<option value="">Любой</option>
<option th:value="'SUPPLIER'" th:text="SUPPLIER" th:selected="${partnerTypeFilter == 'SUPPLIER'}"></option>
<option th:value="'ISSUER'" th:text="ISSUER" th:selected="${partnerTypeFilter == 'ISSUER'}"></option>
</select>
</td>
</tr>
<tr>
<td>ИНН</td>
<td>
<input type="text" id="partnerTaxNumberFilter" name="partnerTaxNumber" th:value="${partnerTaxNumberFilter}">
</td>
</tr>
<tr>
<td colspan="6"><input id="saveBtn" type="submit" value="Применить" class="btn btn-primary"></td>
</tr>
</tbody>
</table>
</form>
<table class="table table-bordered table-warning">
<thead class="thead-dark">
<tr>
<th scope="col">Название</th>
<th scope="col">ИНН</th>
<th scope="col">Тип</th>
<th scope="col">Адрес</th>
</tr>
</thead>
<tbody>
<tr th:if="${partners.isEmpty()}">
<td colspan="6">Данному фильтру не удовлетворяет ни одного партнера.</td>
</tr>
<tr th:each="partner : ${partners}">
<td>
<a th:href="'/partner?id=' + ${partner.getId()}">
<span th:text="${partner.getName()}"></span>
</a>
</td>
<td>
<span th:text="${partner.getTaxNumber()}"></span>
</td>
<td>
<span th:text="${partner.getType()}"></span>
</td>
<td>
<span th:text="${partner.getAddress()}"></span>
</td>
</tr>
</tbody>
</table>
</div>
<div th:replace="~{common :: site-footer}"></div>
<div th:replace="~{common :: site-script}"></div>
</body>
</html>
|