diff --git a/bookstore/src/main/resources/messages.properties b/bookstore/src/main/resources/messages.properties index 982598a..27f4610 100644 --- a/bookstore/src/main/resources/messages.properties +++ b/bookstore/src/main/resources/messages.properties @@ -1,21 +1,22 @@ -# Keep as fall back values if multi-language support is added - -typeMismatch.book.year = Invalid year format -typeMismatch.book.price = Invalid price format - -book.author = Author -book.title = Title -book.isbn = ISBN -book.year = Year -book.price = Price -book.category = Category - -book.desc.set.author = Set book author name -book.desc.set.title = Set book primary title -book.desc.set.isbn = Set book ISBN code -book.desc.set.year = Set book publication year -book.desc.set.price = Set book price -book.desc.set.category = Select appropriate category +# Message keys with values. +# Prepare environment for possible multi-language support + +typeMismatch.book.year = Invalid year format +typeMismatch.book.price = Invalid price format + +book.author = Author +book.title = Title +book.isbn = ISBN +book.year = Year +book.price = Price +book.category = Category + +book.desc.set.author = Set book author name +book.desc.set.title = Set book primary title +book.desc.set.isbn = Set book ISBN code +book.desc.set.year = Set book publication year +book.desc.set.price = Set book price +book.desc.set.category = Select appropriate category book.desc.example.headertext = Valid inputs (examples) book.desc.example.author = Andrzej Sapkowski @@ -24,27 +25,27 @@ book.desc.example.isbn = 1212121-3 or 4545454-67 or 6767676-890 book.desc.example.year = 1854 or 2005 book.desc.example.price = 17 or 123.5 or 45.67 -book.error.author = Invalid author name -book.error.title = Invalid title -book.error.isbn = Invalid ISBN code -book.error.year = Invalid year -book.error.price = Invalid price +book.error.author = Invalid author name +book.error.title = Invalid title +book.error.isbn = Invalid ISBN code +book.error.year = Invalid year +book.error.price = Invalid price -page.title.browser.list = Bookstore page -page.title.browser.add = Add book -page.title.browser.edit = Update book +page.title.browser.list = Bookstore page +page.title.browser.add = Add book +page.title.browser.edit = Update book -page.title.webform.list = Books -page.title.webform.add = Add new book -page.title.webform.edit = Update existing book +page.title.webform.list = Books +page.title.webform.add = Add new book +page.title.webform.edit = Update existing book -page.text.list.actions = Actions -page.text.list.delete = Delete -page.text.list.edit = Edit +page.text.list.actions = Actions +page.text.list.delete = Delete +page.text.list.edit = Edit -button.book.add = Add book -button.book.edit = Update book +button.book.add = Add book +button.book.edit = Update book -button.page.list.return = Return to book list page +button.page.list.return = Return to book list page -page.symbols.currency = \u20AC \ No newline at end of file +page.symbols.currency = \u20AC \ No newline at end of file diff --git a/bookstore/src/main/resources/templates/bookadd.html b/bookstore/src/main/resources/templates/bookadd.html index b757a98..e987822 100644 --- a/bookstore/src/main/resources/templates/bookadd.html +++ b/bookstore/src/main/resources/templates/bookadd.html @@ -2,99 +2,193 @@ - - - + + + + + + page.title.browser.add + +
-

+ +

+ page.title.webform.add +

- + - - - + + book.desc.set.author + + + + book.desc.example.headertext + + + + book.desc.example.author +
Invalid author name
+ th:errors="*{author}">Invalid author value
- + - - - + + book.desc.set.title + + + + book.desc.example.headertext: + + + + book.desc.example.title +
Invalid title
+ th:errors="*{title}">Invalid title value
- + - - - + + book.desc.set.isbn + + + + book.desc.example.headertext: + + + + book.desc.example.isbn +
Invalid ISBN code
- + - - - + + book.desc.set.year + + + + book.desc.example.headertext: + + + + book.desc.example.year +
Invalid year
+ th:errors="*{year}">Invalid year value
- + +
-
+
+ page.symbols.currency +
- + + book.desc.set.price + + + + book.desc.example.headertext: + - - + + book.desc.example.price +
Invalid price
+ th:errors="*{price}">Invalid price value
- + - + + book.desc.set.category +
- +
+
- +
diff --git a/bookstore/src/main/resources/templates/bookedit.html b/bookstore/src/main/resources/templates/bookedit.html index e1c9932..e5d4e97 100644 --- a/bookstore/src/main/resources/templates/bookedit.html +++ b/bookstore/src/main/resources/templates/bookedit.html @@ -2,99 +2,196 @@ - - - + + + + + + page.title.browser.edit + +
-

+ +

+ page.title.webform.edit +

-
+ - - - - + + + book.desc.set.author + + + + book.desc.example.headertext + + + + book.desc.example.author +
Invalid author name
+ th:errors="*{author}">Invalid author value
-
+ - - - + + book.desc.set.title + + + + book.desc.example.headertext: + + + + book.desc.example.title +
Invalid title
-
+ - - - + + book.desc.set.isbn + + + + book.desc.example.headertext + + + + book.desc.example.isbn +
Invalid ISBN code
+ th:errors="*{isbn}">Invalid ISBN code value
-
+ - - - + + book.desc.set.year + + + + book.desc.example.headertext: + + + + book.desc.example.year +
Invalid year
+ th:errors="*{year}">Invalid year value
- +
-
+
+ page.symbols.currency +
- - - + + book.desc.set.price + + + + book.desc.example.headertext: + + + + book.desc.example.price +
Invalid price
+ th:errors="*{price}">Invalid price value
- - + th:value="${category.id}" + th:text="${category.name}" + >(obj) category.name - + + + book.desc.set.category + +
- + +
+
- +
diff --git a/bookstore/src/main/resources/templates/booklist.html b/bookstore/src/main/resources/templates/booklist.html index 9ac1c8b..a9a67a8 100644 --- a/bookstore/src/main/resources/templates/booklist.html +++ b/bookstore/src/main/resources/templates/booklist.html @@ -2,41 +2,69 @@ - - - + + + + + + page.title.browser.list + +
-

+ +

+ page.title.webform.list +

+ - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + + +
book.authorbook.titlebook.isbnbook.yearbook.categorybook.pricepage.text.list.actions
(obj) book.author(obj) book.title(obj) book.isbn(obj) book.year(obj) book.category.name + 0.00 page.symbols.currency + + + page.text.list.delete + + + + page.text.list.edit + +
- + + button.book.add +