correct search
This commit is contained in:
parent
4666fa1f0f
commit
5a2d4ebe97
3 changed files with 4 additions and 2 deletions
|
@ -37,6 +37,8 @@ public class SearchController {
|
|||
if (search.trim().equals(""))
|
||||
return "search";
|
||||
|
||||
model.addAttribute("searchPattern", search);
|
||||
|
||||
if (search.length() < 4){
|
||||
model.addAttribute("error", "Should be at least 4 chars");
|
||||
return "search";
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<li class="li_header_block">
|
||||
<form action="/search" method="get">
|
||||
<div class="wrapper">
|
||||
<input class="search_line" type="text" name="search">
|
||||
<input class="search_line" type="text" name="search" th:value="${searchPattern}">
|
||||
</div>
|
||||
<div class="wrapper" style="justify-content: space-evenly; align-items: baseline; ">
|
||||
<div class="search_checkbox">
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</div>
|
||||
<div th:if="${series != null}">
|
||||
<h3>Series</h3>
|
||||
<div th:each="book : ${books}">
|
||||
<div th:each="book : ${series}">
|
||||
<a th:href="${'/book/' + book.id}">
|
||||
<span class="book_title" th:text="${book.title}"></span>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue