summaryrefslogtreecommitdiff
path: root/src/main/resources/templates/tags/commentBox.html
blob: 40cec4a7e5b792db7c72a502a5c3d2b6e8d15ade (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{@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>
  <script type="module" src="/posts/commentBox.js"></script>

  <hr/>

  <form class="comment-form pure-form" method="post" action="/posts/{postId}/comments">
    <fieldset>
      <legend>Post Comment</legend>

      <label for="comment-form-message-{postId}">Message</label>
      <textarea name="message" id="comment-form-message-{postId}" placeholder="Great article!" required></textarea>

      <input name="hashcash-salt" id="comment-form-hashcash-salt-{postId}" type="hidden"/>

      <div class="controls">
        <input type="submit" class="pure-button"/>
      </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>