Lazychat: Add paging.

Change-Id: I1db0b0733397d5e7a77b925ba185a39a72041f3e
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index b90cc9e..4d03175 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -9,6 +9,7 @@
 
 mulkcms.tag-base = hub.benkard.de
 mulkcms.bookmarks.default-max-results = 25
+mulkcms.lazychat.default-max-results = 25
 
 quarkus.datasource.driver = org.postgresql.Driver
 quarkus.datasource.max-size = 8
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<eu.mulk.mulkcms2.benki.bookmarks.Bookmark> bookmarks}
+{@java.util.List<eu.mulk.mulkcms2.benki.bookmarks.Bookmark> posts}
 {@java.lang.Boolean authenticated}
 {@java.lang.Boolean hasPreviousPage}
 {@java.lang.Boolean hasNextPage}
@@ -38,8 +38,8 @@
 </div>
 
 <section id="main-content">
-  {#for bookmark in bookmarks}
-    {#with bookmark}
+  {#for post in posts}
+    {#with post}
       <article class="bookmark">
         <header>
           <a href="{uri}"><h1 class="bookmark-title">{title}</h1></a>
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<eu.mulk.mulkcms2.benki.lazychat.LazychatMessage> lazychatMessages}
+{@java.util.List<eu.mulk.mulkcms2.benki.lazychat.LazychatMessage> 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}
-    <article class="lazychat-message">
-      <header>
-        <div class="lazychat-message-info">
-          <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
-          <span class="lazychat-message-owner">{owner.firstName} {owner.lastName}</span>
-        </div>
-      </header>
+<div class="paging">
+  {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if}
+  <span class="filler"></span>
+  {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if}
+</div>
 
-      <section class="lazychat-message-content">
-        {contentHtml.raw}
-      </section>
-    </article>
-  {/with}
-{/for}
+<section id="main-content">
+  {#for post in posts}
+    {#with post}
+      <article class="lazychat-message">
+        <header>
+          <div class="lazychat-message-info">
+            <time datetime="{date.htmlDateTime}">{date.humanDateTime}</time>
+            <span class="lazychat-message-owner">{owner.firstName} {owner.lastName}</span>
+          </div>
+        </header>
+
+        <section class="lazychat-message-content">
+          {contentHtml.raw}
+        </section>
+      </article>
+    {/with}
+  {/for}
+</section>
+
+<div class="paging">
+  {#if hasPreviousPage}<a href="?i={previousCursor}&n={pageSize}" class="pure-button">⇠ previous page</a>{/if}
+  <span class="filler"></span>
+  {#if hasNextPage}<a href="?i={nextCursor}&n={pageSize}" class="pure-button">next page ⇢</a>{/if}
+</div>
 
 {/body}