summaryrefslogtreecommitdiff
path: root/src/main/resources/templates/benki/lazychat/lazychatList.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/templates/benki/lazychat/lazychatList.html')
-rw-r--r--src/main/resources/templates/benki/lazychat/lazychatList.html54
1 files changed, 37 insertions, 17 deletions
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>
-
- <section class="lazychat-message-content">
- {contentHtml.raw}
- </section>
- </article>
- {/with}
-{/for}
+<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 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}