Browse Source

Also consider NULL/None category type for books

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.2-alpha
Pekka Helenius 4 years ago
parent
commit
11dde7c3d0
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      bookstore/src/main/resources/templates/bookedit.html
  2. +1
    -1
      bookstore/src/main/resources/templates/booklist.html

+ 1
- 0
bookstore/src/main/resources/templates/bookedit.html View File

@ -169,6 +169,7 @@
th:value="${category.id}" th:value="${category.id}"
th:text="${category.name}" th:text="${category.name}"
>(obj) category.name</option> >(obj) category.name</option>
<option value="">None</option>
</select> </select>
<small class="form-text text-muted" <small class="form-text text-muted"


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

@ -37,7 +37,7 @@
<td th:text="${book.title}">(obj) book.title</td> <td th:text="${book.title}">(obj) book.title</td>
<td th:text="${book.isbn}">(obj) book.isbn</td> <td th:text="${book.isbn}">(obj) book.isbn</td>
<td th:text="${book.year}">(obj) book.year</td> <td th:text="${book.year}">(obj) book.year</td>
<td th:text="${book.category.name}">(obj) book.category.name</td>
<td th:text="${book.category != null} ? ${book.category.name} : 'None'">(obj) book.category.name</td>
<td th:text="(${#numbers.formatDecimal(book.price, 1, 2)} ?: '0.00') + ' ' + (${#messages.msgOrNull('page.symbols.currency')} ?: 'page.symbols.currency')"> <td th:text="(${#numbers.formatDecimal(book.price, 1, 2)} ?: '0.00') + ' ' + (${#messages.msgOrNull('page.symbols.currency')} ?: 'page.symbols.currency')">
0.00 page.symbols.currency 0.00 page.symbols.currency
</td> </td>


Loading…
Cancel
Save