From 81b45f4c1999689388dfd9cec1a9806d38aebbdd Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Wed, 7 Oct 2020 00:36:55 +0300 Subject: [PATCH] Update web forms: use component naming scheme; use multiple lines on some field values Signed-off-by: Pekka Helenius --- .../src/main/resources/templates/apiref.html | 210 +++++++++++++----- .../src/main/resources/templates/bookadd.html | 18 +- .../main/resources/templates/bookedit.html | 18 +- .../main/resources/templates/booklist.html | 45 ++-- .../templates/fragments/devusers.html | 16 +- .../templates/fragments/loginout.html | 24 +- 6 files changed, 182 insertions(+), 149 deletions(-) diff --git a/bookstore/src/main/resources/templates/apiref.html b/bookstore/src/main/resources/templates/apiref.html index a92f5ba..3cd672b 100644 --- a/bookstore/src/main/resources/templates/apiref.html +++ b/bookstore/src/main/resources/templates/apiref.html @@ -11,7 +11,12 @@ - +

page.title.webform.apiref @@ -23,6 +28,7 @@ */--> + + + + - + + + - + - + - + - + - + + - + - + - + - + - + - + - + + + + - + + - + + + @@ -206,9 +193,9 @@ h2consolepage = ${@environment.getProperty('spring.h2.console.path')} @@ -216,7 +203,8 @@ h2consolepage = ${@environment.getProperty('spring.h2.console.path')}

@@ -37,49 +43,67 @@ */-->

- + code placeholder + th:href=" + ${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTBOOKS}__} + '/' + "> page.text.apiref.link
- + code placeholder + th:href=" + ${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTCATEGORIES}__} + '/' + "> page.text.apiref.link
- + code placeholder + th:href=" + ${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTAUTHORS}__} + '/' + "> page.text.apiref.link

@@ -91,95 +115,127 @@

- + code placeholder + th:href=" + ${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTBOOKS}__} + '/search/title?name=Bloody+Chamber' + "> page.text.apiref.link
- + code placeholder + th:href=" + ${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTCATEGORIES}__} + '/search/category?name=Fantasy' + "> page.text.apiref.link
- + code placeholder + th:href=" + ${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTCATEGORIES}__} + '/search/category?name=horr' + "> page.text.apiref.link
- + code placeholder + th:href=" + ${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTAUTHORS}__} + '/search/fullname?firstname=Angela&lastname=Carter' + "> page.text.apiref.link
- + code placeholder + th:href=" + ${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTAUTHORS}__} + '/search/firstname?firstname=anGel' + "> page.text.apiref.link
- + code placeholder + th:href=" + ${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTAUTHORS}__} + '/search/lastname?lastname=Sapkowski' + "> page.text.apiref.link

@@ -188,9 +244,14 @@

- + code placeholder
@@ -200,13 +261,14 @@
+ th:href=" + ${baseUrl} + @{__${@Pages.REST}__} + @{__${@Pages.RESTBOOKS}__} + '/2' + "> page.text.apiref.link

@@ -215,38 +277,50 @@

page.text.apiref.book.add.a
- + code placeholder
page.text.apiref.book.add.b
- + code placeholder
page.text.apiref.book.add.c
- + code placeholder
@@ -255,14 +329,18 @@
page.text.apiref.book.add.d
- + code placeholder
@@ -271,13 +349,13 @@
page.text.apiref.unix.info

@@ -286,28 +364,39 @@

page.text.apiref.book.add.a
- + code placeholder
page.text.apiref.book.add.b
- + code placeholder
@@ -319,7 +408,7 @@

@@ -328,9 +417,14 @@

- + code placeholder
@@ -339,7 +433,7 @@ page.text.apiref.unix.info

@@ -348,9 +442,14 @@

- + code placeholder
@@ -359,10 +458,11 @@ page.text.apiref.unix.info
- button.page.list.return diff --git a/bookstore/src/main/resources/templates/bookadd.html b/bookstore/src/main/resources/templates/bookadd.html index 5c7ad6a..8801a0e 100644 --- a/bookstore/src/main/resources/templates/bookadd.html +++ b/bookstore/src/main/resources/templates/bookadd.html @@ -12,21 +12,7 @@ - - +
@@ -47,7 +33,7 @@ h2consolepage = ${@environment.getProperty('spring.h2.console.path')}
- button.page.list.return diff --git a/bookstore/src/main/resources/templates/bookedit.html b/bookstore/src/main/resources/templates/bookedit.html index 694ff82..aac737d 100644 --- a/bookstore/src/main/resources/templates/bookedit.html +++ b/bookstore/src/main/resources/templates/bookedit.html @@ -12,21 +12,7 @@ - - +
@@ -48,7 +34,7 @@ h2consolepage = ${@environment.getProperty('spring.h2.console.path')}
- button.page.list.return diff --git a/bookstore/src/main/resources/templates/booklist.html b/bookstore/src/main/resources/templates/booklist.html index 9feaeb3..0c068b4 100644 --- a/bookstore/src/main/resources/templates/booklist.html +++ b/bookstore/src/main/resources/templates/booklist.html @@ -49,20 +49,7 @@ Idea of the following syntax used in this and other HTML document: - +
@@ -178,26 +165,26 @@ h2consolepage = ${@environment.getProperty('spring.h2.console.path')}

- page.text.list.[yes|no] + page.text.book.publish.[yes|no]

- page.text.list.delete + th:href="@{__${@Pages.DELETE}__/{hash_id}(hash_id=${book.bookHash.hashId})}" + th:text="${#messages.msgOrNull('page.text.book.delete')} ?: 'page.text.book.delete'"> + page.text.book.delete - page.text.list.edit + th:href="@{__${@Pages.EDIT}__/{hash_id}(hash_id=${book.bookHash.hashId})}" + th:text="${#messages.msgOrNull('page.text.book.edit')} ?: 'page.text.book.edit'"> + page.text.book.edit - page.text.list.json + th:href="@{__${@Pages.JSON}__} + @{__${@Pages.JSONBOOK}__/{hash_id}(hash_id=${book.bookHash.hashId})}" + th:text="${#messages.msgOrNull('page.text.book.json')} ?: 'page.text.book.json'"> + page.text.book.json
- button.book.add @@ -230,7 +218,7 @@ h2consolepage = ${@environment.getProperty('spring.h2.console.path')} - button.page.list.json @@ -239,7 +227,8 @@ h2consolepage = ${@environment.getProperty('spring.h2.console.path')}
- button.page.apiref diff --git a/bookstore/src/main/resources/templates/fragments/devusers.html b/bookstore/src/main/resources/templates/fragments/devusers.html index 9297bdf..bcaa53e 100644 --- a/bookstore/src/main/resources/templates/fragments/devusers.html +++ b/bookstore/src/main/resources/templates/fragments/devusers.html @@ -5,21 +5,7 @@ - - +