From 573f806676a7ebc2a62aa39d742127fbf74fbb3c Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 22 Mar 2020 09:23:07 +0100 Subject: Lazychat: Add paging. Change-Id: I1db0b0733397d5e7a77b925ba185a39a72041f3e --- .../templates/benki/bookmarks/bookmarkList.html | 6 +-- .../templates/benki/lazychat/lazychatList.html | 54 +++++++++++++++------- 2 files changed, 40 insertions(+), 20 deletions(-) (limited to 'src/main/resources/templates') diff --git a/src/main/resources/templates/benki/bookmarks/bookmarkList.html b/src/main/resources/templates/benki/bookmarks/bookmarkList.html index 290cb26..8c87a55 100644 --- a/src/main/resources/templates/benki/bookmarks/bookmarkList.html +++ b/src/main/resources/templates/benki/bookmarks/bookmarkList.html @@ -1,4 +1,4 @@ -{@java.util.List bookmarks} +{@java.util.List posts} {@java.lang.Boolean authenticated} {@java.lang.Boolean hasPreviousPage} {@java.lang.Boolean hasNextPage} @@ -38,8 +38,8 @@
- {#for bookmark in bookmarks} - {#with bookmark} + {#for post in posts} + {#with post}

{title}

diff --git a/src/main/resources/templates/benki/lazychat/lazychatList.html b/src/main/resources/templates/benki/lazychat/lazychatList.html index ecac7a7..b644662 100644 --- a/src/main/resources/templates/benki/lazychat/lazychatList.html +++ b/src/main/resources/templates/benki/lazychat/lazychatList.html @@ -1,4 +1,10 @@ -{@java.util.List lazychatMessages} +{@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} @@ -10,22 +16,36 @@ {#body} -{#for lazychatMessage in lazychatMessages} - {#with lazychatMessage} -
-
-
- - {owner.firstName} {owner.lastName} -
-
- -
- {contentHtml.raw} -
-
- {/with} -{/for} +
+ {#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} -- cgit v1.2.3