внешний вид
This commit is contained in:
parent
a914eda4e9
commit
f44212ad1f
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -28,8 +28,8 @@
|
|||||||
</button>
|
</button>
|
||||||
<div class="collapse navbar-collapse" id="main-navbar">
|
<div class="collapse navbar-collapse" id="main-navbar">
|
||||||
<ul class="navbar-nav me-auto link" th:with="activeLink=${#objects.nullSafe(servletPath, '')}">
|
<ul class="navbar-nav me-auto link" th:with="activeLink=${#objects.nullSafe(servletPath, '')}">
|
||||||
<a class="nav-link my-a" href="/profile"
|
<a class="nav-link my-a" href="/orders"
|
||||||
th:classappend="${activeLink.startsWith('/profile') ? 'active' : ''}">
|
th:classappend="${activeLink.startsWith('/orders') ? 'active' : ''}">
|
||||||
Личный кабинет
|
Личный кабинет
|
||||||
</a>
|
</a>
|
||||||
<th:block sec:authorize="hasRole('ADMIN')">
|
<th:block sec:authorize="hasRole('ADMIN')">
|
||||||
|
@ -24,10 +24,6 @@
|
|||||||
<button type="submit" class="btn btn-secondary ms-2">Показать</button>
|
<button type="submit" class="btn btn-secondary ms-2">Показать</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form class="search-form" th:action="@{/}" method="get" style="display: flex;">
|
|
||||||
<input type="text" th:name="query" th:value="${query}" placeholder="Введите название" />
|
|
||||||
<button class="btn btn-secondary ms-2" type="submit">Поиск</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4" style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px">
|
<div class="mt-4" style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px">
|
||||||
@ -65,3 +61,21 @@
|
|||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <form class="search-form" th:action="@{/}" method="get" style="display: flex;">
|
||||||
|
<input type="text" th:name="query" th:value="${query}" placeholder="Введите название" />
|
||||||
|
<button class="btn btn-secondary ms-2" type="submit">Поиск</button>
|
||||||
|
</form> -->
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<main layout:fragment="content">
|
<main layout:fragment="content">
|
||||||
|
<div class="container">
|
||||||
<h1>Заказ №[[${order.id}]], [[${#dates.format(order.date, 'HH:mm dd-MM-yyyy')}]]</h1>
|
<h1>Заказ №[[${order.id}]], [[${#dates.format(order.date, 'HH:mm dd-MM-yyyy')}]]</h1>
|
||||||
<th:block th:switch="${items.size()}">
|
<th:block th:switch="${items.size()}">
|
||||||
<h2 th:case="0">Товары заказа отсутствуют</h2>
|
<h2 th:case="0">Товары заказа отсутствуют</h2>
|
||||||
@ -36,6 +37,7 @@
|
|||||||
<h2>Итого: [[${#numbers.formatDecimal(order.total, 1, 2)}]] руб</h2>
|
<h2>Итого: [[${#numbers.formatDecimal(order.total, 1, 2)}]] руб</h2>
|
||||||
<button class="btn btn-secondary" onclick="history.back()">Назад</button>
|
<button class="btn btn-secondary" onclick="history.back()">Назад</button>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<main layout:fragment="content">
|
<main layout:fragment="content">
|
||||||
|
<div class="container">
|
||||||
|
<h2>Личный кабинет</h2>
|
||||||
<th:block th:fragment="orders (items, totalPages, currentPage)">
|
<th:block th:fragment="orders (items, totalPages, currentPage)">
|
||||||
<th:block th:switch="${items.size()}">
|
<th:block th:switch="${items.size()}">
|
||||||
<h2 th:case="0">Данные отсутствуют</h2>
|
<h2 th:case="0">Данные отсутствуют</h2>
|
||||||
@ -39,6 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -11,20 +11,8 @@
|
|||||||
<h2 th:case="0">Данные отсутствуют</h2>
|
<h2 th:case="0">Данные отсутствуют</h2>
|
||||||
<th:block th:case="*">
|
<th:block th:case="*">
|
||||||
<div class = "container">
|
<div class = "container">
|
||||||
|
|
||||||
<h2>Товары</h2>
|
<h2>Товары</h2>
|
||||||
|
|
||||||
<ul class="nav nav-underline justify-content-center" role="tablist">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link active" data-bs-toggle="pill" href="#products">Позиции</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" data-bs-toggle="pill" href="#stats">Статистика</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="tab-content mt-2">
|
|
||||||
<div class="tab-pane container active" id="products">
|
|
||||||
<div class="d-flex align-items-center justify-content-between">
|
<div class="d-flex align-items-center justify-content-between">
|
||||||
<a href="/admin/product/edit/" class="btn btn-secondary">Добавить товар</a>
|
<a href="/admin/product/edit/" class="btn btn-secondary">Добавить товар</a>
|
||||||
<form class="search-form" th:action="@{/admin/product}" method="get" style="display: flex;">
|
<form class="search-form" th:action="@{/admin/product}" method="get" style="display: flex;">
|
||||||
@ -74,14 +62,9 @@
|
|||||||
currentPage=${currentPage}) }" />
|
currentPage=${currentPage}) }" />
|
||||||
</th:block>
|
</th:block>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane container fade" id="stats">
|
<!-- <div class="tab-pane container fade" id="stats">
|
||||||
<ul class="list-group mb-2">
|
|
||||||
<li th:each="stat : ${stats}" class="list-group-item">
|
</div> -->
|
||||||
<strong>[[${stat.typeId}]]</strong>:
|
|
||||||
[[${#numbers.formatDecimal(stat.totalPrice, 1, 2)}]] ₽
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
@ -90,3 +73,35 @@
|
|||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <ul class="nav nav-underline justify-content-center" role="tablist">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" data-bs-toggle="pill" href="#products">Позиции</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" data-bs-toggle="pill" href="#stats">Статистика</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="tab-content mt-2">
|
||||||
|
<div class="tab-pane container active" id="products"> -->
|
@ -8,7 +8,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<main layout:fragment="content">
|
<main layout:fragment="content">
|
||||||
<h2>Личный кабинет</h2>
|
<h2>Личный кабинет</h2>
|
||||||
<ul class="nav nav-underline justify-content-center" role="tablist">
|
<!-- <ul class="nav nav-underline justify-content-center" role="tablist">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active" data-bs-toggle="pill" href="#orders">Заказы</a>
|
<a class="nav-link active" data-bs-toggle="pill" href="#orders">Заказы</a>
|
||||||
</li>
|
</li>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -110,10 +110,6 @@ public class ProductController {
|
|||||||
@GetMapping("/edit/")
|
@GetMapping("/edit/")
|
||||||
public String create(Model model) {
|
public String create(Model model) {
|
||||||
model.addAttribute(PRODUCT_ATTRIBUTE, new ProductDto());
|
model.addAttribute(PRODUCT_ATTRIBUTE, new ProductDto());
|
||||||
/*model.addAttribute("stats",
|
|
||||||
productService.getTotal().stream()
|
|
||||||
.map(this::toGroupedDto)
|
|
||||||
.toList()); */
|
|
||||||
model.addAttribute("types",
|
model.addAttribute("types",
|
||||||
typeService.getAll().stream()
|
typeService.getAll().stream()
|
||||||
.map(this::toTypeDto)
|
.map(this::toTypeDto)
|
||||||
@ -139,10 +135,6 @@ public class ProductController {
|
|||||||
if (id <= 0) {
|
if (id <= 0) {
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
/*model.addAttribute("stats",
|
|
||||||
productService.getTotal().stream()
|
|
||||||
.map(this::toGroupedDto)
|
|
||||||
.toList()); */
|
|
||||||
model.addAttribute("types",
|
model.addAttribute("types",
|
||||||
typeService.getAll().stream()
|
typeService.getAll().stream()
|
||||||
.map(this::toTypeDto)
|
.map(this::toTypeDto)
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
</button>
|
</button>
|
||||||
<div class="collapse navbar-collapse" id="main-navbar">
|
<div class="collapse navbar-collapse" id="main-navbar">
|
||||||
<ul class="navbar-nav me-auto link" th:with="activeLink=${#objects.nullSafe(servletPath, '')}">
|
<ul class="navbar-nav me-auto link" th:with="activeLink=${#objects.nullSafe(servletPath, '')}">
|
||||||
<a class="nav-link my-a" href="/profile"
|
<a class="nav-link my-a" href="/orders"
|
||||||
th:classappend="${activeLink.startsWith('/profile') ? 'active' : ''}">
|
th:classappend="${activeLink.startsWith('/orders') ? 'active' : ''}">
|
||||||
Личный кабинет
|
Личный кабинет
|
||||||
</a>
|
</a>
|
||||||
<th:block sec:authorize="hasRole('ADMIN')">
|
<th:block sec:authorize="hasRole('ADMIN')">
|
||||||
|
@ -24,10 +24,6 @@
|
|||||||
<button type="submit" class="btn btn-secondary ms-2">Показать</button>
|
<button type="submit" class="btn btn-secondary ms-2">Показать</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form class="search-form" th:action="@{/}" method="get" style="display: flex;">
|
|
||||||
<input type="text" th:name="query" th:value="${query}" placeholder="Введите название" />
|
|
||||||
<button class="btn btn-secondary ms-2" type="submit">Поиск</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4" style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px">
|
<div class="mt-4" style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px">
|
||||||
@ -65,3 +61,21 @@
|
|||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <form class="search-form" th:action="@{/}" method="get" style="display: flex;">
|
||||||
|
<input type="text" th:name="query" th:value="${query}" placeholder="Введите название" />
|
||||||
|
<button class="btn btn-secondary ms-2" type="submit">Поиск</button>
|
||||||
|
</form> -->
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<main layout:fragment="content">
|
<main layout:fragment="content">
|
||||||
|
<div class="container">
|
||||||
<h1>Заказ №[[${order.id}]], [[${#dates.format(order.date, 'HH:mm dd-MM-yyyy')}]]</h1>
|
<h1>Заказ №[[${order.id}]], [[${#dates.format(order.date, 'HH:mm dd-MM-yyyy')}]]</h1>
|
||||||
<th:block th:switch="${items.size()}">
|
<th:block th:switch="${items.size()}">
|
||||||
<h2 th:case="0">Товары заказа отсутствуют</h2>
|
<h2 th:case="0">Товары заказа отсутствуют</h2>
|
||||||
@ -36,6 +37,7 @@
|
|||||||
<h2>Итого: [[${#numbers.formatDecimal(order.total, 1, 2)}]] руб</h2>
|
<h2>Итого: [[${#numbers.formatDecimal(order.total, 1, 2)}]] руб</h2>
|
||||||
<button class="btn btn-secondary" onclick="history.back()">Назад</button>
|
<button class="btn btn-secondary" onclick="history.back()">Назад</button>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<main layout:fragment="content">
|
<main layout:fragment="content">
|
||||||
|
<div class="container">
|
||||||
|
<h2>Личный кабинет</h2>
|
||||||
<th:block th:fragment="orders (items, totalPages, currentPage)">
|
<th:block th:fragment="orders (items, totalPages, currentPage)">
|
||||||
<th:block th:switch="${items.size()}">
|
<th:block th:switch="${items.size()}">
|
||||||
<h2 th:case="0">Данные отсутствуют</h2>
|
<h2 th:case="0">Данные отсутствуют</h2>
|
||||||
@ -39,6 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -11,20 +11,8 @@
|
|||||||
<h2 th:case="0">Данные отсутствуют</h2>
|
<h2 th:case="0">Данные отсутствуют</h2>
|
||||||
<th:block th:case="*">
|
<th:block th:case="*">
|
||||||
<div class = "container">
|
<div class = "container">
|
||||||
|
|
||||||
<h2>Товары</h2>
|
<h2>Товары</h2>
|
||||||
|
|
||||||
<ul class="nav nav-underline justify-content-center" role="tablist">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link active" data-bs-toggle="pill" href="#products">Позиции</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" data-bs-toggle="pill" href="#stats">Статистика</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="tab-content mt-2">
|
|
||||||
<div class="tab-pane container active" id="products">
|
|
||||||
<div class="d-flex align-items-center justify-content-between">
|
<div class="d-flex align-items-center justify-content-between">
|
||||||
<a href="/admin/product/edit/" class="btn btn-secondary">Добавить товар</a>
|
<a href="/admin/product/edit/" class="btn btn-secondary">Добавить товар</a>
|
||||||
<form class="search-form" th:action="@{/admin/product}" method="get" style="display: flex;">
|
<form class="search-form" th:action="@{/admin/product}" method="get" style="display: flex;">
|
||||||
@ -74,14 +62,9 @@
|
|||||||
currentPage=${currentPage}) }" />
|
currentPage=${currentPage}) }" />
|
||||||
</th:block>
|
</th:block>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane container fade" id="stats">
|
<!-- <div class="tab-pane container fade" id="stats">
|
||||||
<ul class="list-group mb-2">
|
|
||||||
<li th:each="stat : ${stats}" class="list-group-item">
|
</div> -->
|
||||||
<strong>[[${stat.typeId}]]</strong>:
|
|
||||||
[[${#numbers.formatDecimal(stat.totalPrice, 1, 2)}]] ₽
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
@ -90,3 +73,35 @@
|
|||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <ul class="nav nav-underline justify-content-center" role="tablist">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" data-bs-toggle="pill" href="#products">Позиции</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" data-bs-toggle="pill" href="#stats">Статистика</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="tab-content mt-2">
|
||||||
|
<div class="tab-pane container active" id="products"> -->
|
@ -8,7 +8,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<main layout:fragment="content">
|
<main layout:fragment="content">
|
||||||
<h2>Личный кабинет</h2>
|
<h2>Личный кабинет</h2>
|
||||||
<ul class="nav nav-underline justify-content-center" role="tablist">
|
<!-- <ul class="nav nav-underline justify-content-center" role="tablist">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active" data-bs-toggle="pill" href="#orders">Заказы</a>
|
<a class="nav-link active" data-bs-toggle="pill" href="#orders">Заказы</a>
|
||||||
</li>
|
</li>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user