Browse Source

Book max count info box: move to the book list page

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.4-alpha
Pekka Helenius 4 years ago
parent
commit
ff9048cefb
3 changed files with 8 additions and 8 deletions
  1. +1
    -1
      bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java
  2. +6
    -1
      bookstore/src/main/resources/templates/booklist.html
  3. +1
    -6
      bookstore/src/main/resources/templates/fragments/bookfields.html

+ 1
- 1
bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java View File

@ -229,7 +229,7 @@ public class BookController {
+ " " + env.getProperty("security.book.count.max") + "."
);
return "redirect:" + env.getProperty("page.url.add");
return "redirect:" + env.getProperty("page.url.list");
}


+ 6
- 1
bookstore/src/main/resources/templates/booklist.html View File

@ -245,7 +245,12 @@ Idea of the following syntax used in this and other HTML document:
</tr>
</table>
<div class="alert alert-danger mt-2" th:if="${bookmaxcount != null}"
th:text="${bookmaxcount}">
Unable to add more books. Book count limit is X.
</div>
<div sec:authorize="isAnonymous()">
<p th:text="${#messages.msgOrNull('page.text.list.anon.info')} ?: 'page.text.list.anon.info'">
page.text.list.anon.info


+ 1
- 6
bookstore/src/main/resources/templates/fragments/bookfields.html View File

@ -11,12 +11,7 @@
<th:block th:fragment="bookfields">
<div class="bookform-section">
<div class="alert alert-danger mt-2" th:if="${bookmaxcount != null}"
th:text="${bookmaxcount}">
Unable to add more books. Book count limit is X.
</div>
<div>
<h3 th:text="${#messages.msgOrNull('book.author')} ?: 'book.author'">
book.author


Loading…
Cancel
Save