summaryrefslogtreecommitdiff
path: root/src/main/resources/templates
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/templates')
-rw-r--r--src/main/resources/templates/benki/posts/postList.html4
-rw-r--r--src/main/resources/templates/tags/commentBox.html20
2 files changed, 19 insertions, 5 deletions
diff --git a/src/main/resources/templates/benki/posts/postList.html b/src/main/resources/templates/benki/posts/postList.html
index 0fc8a6d..2f932ec 100644
--- a/src/main/resources/templates/benki/posts/postList.html
+++ b/src/main/resources/templates/benki/posts/postList.html
@@ -84,7 +84,7 @@
</div>
{#if showCommentBox}
- {#commentBox postId=post.id /}
+ {#commentBox postId=post.id comments=post.comments /}
{/if}
</article>
{#else}
@@ -117,7 +117,7 @@
</div>
{#if showCommentBox}
- {#commentBox postId=post.id /}
+ {#commentBox postId=post.id comments=post.comments /}
{/if}
</article>
{/if}
diff --git a/src/main/resources/templates/tags/commentBox.html b/src/main/resources/templates/tags/commentBox.html
index 3049687..40cec4a 100644
--- a/src/main/resources/templates/tags/commentBox.html
+++ b/src/main/resources/templates/tags/commentBox.html
@@ -1,4 +1,5 @@
{@java.lang.Integer postId}
+{@java.util.List<eu.mulk.mulkcms2.benki.lazychat.LazychatMessage> comments}
<div class="comment-box">
<script type="module" src="/lib.js"></script>
@@ -10,9 +11,6 @@
<fieldset>
<legend>Post Comment</legend>
- <label for="comment-form-author-{postId}">Author (optional)</label>
- <input name="author" id="comment-form-author-{postId}" type="text" placeholder="Anonymous Coward"/>
-
<label for="comment-form-message-{postId}">Message</label>
<textarea name="message" id="comment-form-message-{postId}" placeholder="Great article!" required></textarea>
@@ -23,4 +21,20 @@
</div>
</fieldset>
</form>
+
+ {#for comment in comments}
+ <div class="comment" id="comment-{comment.id}">
+ {#if comment.owner != null}<span class="comment-owner post-owner">{comment.owner.firstName}</span>{/if}
+
+ <div class="comment-info">
+ <a class="comment-link" href="/posts/{postId}#comment-{comment.id}">
+ <span class="comment-self-link">#</span>
+ </a>
+ </div>
+
+ <div class="comment-content post-content">
+ {comment.descriptionHtml.raw}
+ </div>
+ </div>
+ {/for}
</div>