From 371164a188b93b24f33cb5badb0362ac2544d33d Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 23 Mar 2020 06:21:25 +0100 Subject: Use generic page template for bookmark and lazy chat lists. Change-Id: I86cc78c8164d6672d8b5cfbc2a3433954068967e --- .../resources/templates/benki/about/index.html | 2 + .../templates/benki/bookmarks/bookmarkList.html | 68 ----------------- .../templates/benki/lazychat/lazychatList.html | 52 ------------- .../resources/templates/benki/posts/postList.html | 85 ++++++++++++++++++++++ .../resources/templates/benki/wiki/wikiPage.html | 2 + .../templates/benki/wiki/wikiPageRevisionList.html | 2 + 6 files changed, 91 insertions(+), 120 deletions(-) delete mode 100644 src/main/resources/templates/benki/bookmarks/bookmarkList.html delete mode 100644 src/main/resources/templates/benki/lazychat/lazychatList.html create mode 100644 src/main/resources/templates/benki/posts/postList.html (limited to 'src/main/resources/templates/benki') diff --git a/src/main/resources/templates/benki/about/index.html b/src/main/resources/templates/benki/about/index.html index 520644e..edfd82e 100644 --- a/src/main/resources/templates/benki/about/index.html +++ b/src/main/resources/templates/benki/about/index.html @@ -6,6 +6,8 @@ {#siteSection}About This Site{/siteSection} {#aboutClass}this-page{/aboutClass} +{#nav}{#navbar siteSection="About" /}{/nav} + {#head}{/head} {#body} diff --git a/src/main/resources/templates/benki/bookmarks/bookmarkList.html b/src/main/resources/templates/benki/bookmarks/bookmarkList.html deleted file mode 100644 index 8c87a55..0000000 --- a/src/main/resources/templates/benki/bookmarks/bookmarkList.html +++ /dev/null @@ -1,68 +0,0 @@ -{@java.util.List posts} -{@java.lang.Boolean authenticated} -{@java.lang.Boolean hasPreviousPage} -{@java.lang.Boolean hasNextPage} -{@java.lang.Integer previousCursor} -{@java.lang.Integer nextCursor} -{@java.lang.Integer pageSize} - -{#include base.html} - -{#title}Benki Bookmarks{/title} -{#siteSection}Bookmarks{/siteSection} -{#bookmarksClass}this-page{/bookmarksClass} - -{#head} - - - - - -{/head} - -{#body} - -{! #if authenticated !} - -

-
- -
-
-{! /if !} - -
- {#if hasPreviousPage}⇠ previous page{/if} - - {#if hasNextPage}next page ⇢{/if} -
- -
- {#for post in posts} - {#with post} -
-
-

{title}

-
- - {owner.firstName} {owner.lastName} -
-
- -
- {descriptionHtml.raw} -
-
- {/with} - {/for} -
- -
- {#if hasPreviousPage}⇠ previous page{/if} - - {#if hasNextPage}next page ⇢{/if} -
- -{/body} - -{/include} diff --git a/src/main/resources/templates/benki/lazychat/lazychatList.html b/src/main/resources/templates/benki/lazychat/lazychatList.html deleted file mode 100644 index b644662..0000000 --- a/src/main/resources/templates/benki/lazychat/lazychatList.html +++ /dev/null @@ -1,52 +0,0 @@ -{@java.util.List posts} -{@java.lang.Boolean authenticated} -{@java.lang.Boolean hasPreviousPage} -{@java.lang.Boolean hasNextPage} -{@java.lang.Integer previousCursor} -{@java.lang.Integer nextCursor} -{@java.lang.Integer pageSize} - -{#include base.html} - -{#title}Benki Lazychat{/title} -{#siteSection}Lazychat{/siteSection} -{#lazychatClass}this-page{/lazychatClass} - -{#head}{/head} - -{#body} - -
- {#if hasPreviousPage}⇠ previous page{/if} - - {#if hasNextPage}next page ⇢{/if} -
- -
- {#for post in posts} - {#with post} -
-
-
- - {owner.firstName} {owner.lastName} -
-
- -
- {contentHtml.raw} -
-
- {/with} - {/for} -
- -
- {#if hasPreviousPage}⇠ previous page{/if} - - {#if hasNextPage}next page ⇢{/if} -
- -{/body} - -{/include} diff --git a/src/main/resources/templates/benki/posts/postList.html b/src/main/resources/templates/benki/posts/postList.html new file mode 100644 index 0000000..b68f796 --- /dev/null +++ b/src/main/resources/templates/benki/posts/postList.html @@ -0,0 +1,85 @@ +{@java.util.List posts} +{@java.lang.String pageTitle} +{@java.lang.Boolean showBookmarkForm} +{@java.lang.Boolean hasPreviousPage} +{@java.lang.Boolean hasNextPage} +{@java.lang.Integer previousCursor} +{@java.lang.Integer nextCursor} +{@java.lang.Integer pageSize} + +{#include base.html} + +{#title}Benki {pageTitle}{/title} +{#siteSection}{pageTitle}{/siteSection} + +{#nav}{#navbar siteSection=pageTitle /}{/nav} + +{#head} + + + + + +{/head} + +{#body} + +{#if showBookmarkForm} + +

+
+ +
+
+{/if} + +
+ {#if hasPreviousPage}⇠ previous page{/if} + + {#if hasNextPage}next page ⇢{/if} +
+ +
+ {#for post in posts} + {#with post} + {#if post.isBookmark} +
+
+

{title}

+
+ + {owner.firstName} {owner.lastName} +
+
+ +
+ {descriptionHtml.raw} +
+
+ {#else} +
+
+
+ + {owner.firstName} {owner.lastName} +
+
+ +
+ {contentHtml.raw} +
+
+ {/if} + {/with} + {/for} +
+ +
+ {#if hasPreviousPage}⇠ previous page{/if} + + {#if hasNextPage}next page ⇢{/if} +
+ +{/body} + +{/include} diff --git a/src/main/resources/templates/benki/wiki/wikiPage.html b/src/main/resources/templates/benki/wiki/wikiPage.html index c5155bc..a98b147 100644 --- a/src/main/resources/templates/benki/wiki/wikiPage.html +++ b/src/main/resources/templates/benki/wiki/wikiPage.html @@ -6,6 +6,8 @@ {#siteSection}Wiki{/siteSection} {#wikiClass}this-page{/wikiClass} +{#nav}{#navbar siteSection="Wiki" /}{/nav} + {#head} diff --git a/src/main/resources/templates/benki/wiki/wikiPageRevisionList.html b/src/main/resources/templates/benki/wiki/wikiPageRevisionList.html index 2fd04eb..91e5058 100644 --- a/src/main/resources/templates/benki/wiki/wikiPageRevisionList.html +++ b/src/main/resources/templates/benki/wiki/wikiPageRevisionList.html @@ -7,6 +7,8 @@ {#siteSection}Wiki{/siteSection} {#wikiClass}this-page{/wikiClass} +{#nav}{#navbar siteSection="Wiki" /}{/nav} + {#body}

Revisions — {title}

-- cgit v1.2.3