aboutsummaryrefslogtreecommitdiff
path: root/client/html
diff options
context:
space:
mode:
authorrr-2016-06-12 18:08:50 +0200
committerrr-2016-06-12 18:11:56 +0200
commita28b4bdd3e0e5c0d07e05eb3353226a7925f38ef (patch)
tree18c46b791ad57e73826649f10d0e2396f42a0946 /client/html
parentb9fc626ace1ed71e9309bb7c7acb99224f9aaf4c (diff)
client/comments: add comment adding
Diffstat (limited to 'client/html')
-rw-r--r--client/html/comment.tpl28
-rw-r--r--client/html/comment_form.tpl31
-rw-r--r--client/html/post.tpl9
3 files changed, 40 insertions, 28 deletions
diff --git a/client/html/comment.tpl b/client/html/comment.tpl
index aac6346..32eba69 100644
--- a/client/html/comment.tpl
+++ b/client/html/comment.tpl
@@ -44,32 +44,6 @@
--><% } %><!--
--></header>
- <div class='tabs'>
- <form>
- <div class='tabs-wrapper'>
- <div class='preview tab'>
- <div class='content-wrapper'><div class='content'><%= ctx.makeMarkdown(ctx.comment.text) %></div></div>
- </div>
-
- <div class='edit tab'>
- <textarea required minlength=1><%= ctx.comment.text %></textarea>
- </div>
- </div>
-
- <nav class='buttons'>
- <ul>
- <li class='preview'><a href='#'>Preview</a></li>
- <li class='edit'><a href='#'>Edit</a></li>
- </ul>
- </nav>
-
- <nav class='actions'>
- <input type='submit' class='save' value='Save'/>
- <input type='button' class='cancel discourage' value='Cancel'/>
- </nav>
- </form>
-
- <div class='messages'></div>
- </div>
+ <div class='comment-form-container'></div>
</div>
</div>
diff --git a/client/html/comment_form.tpl b/client/html/comment_form.tpl
new file mode 100644
index 0000000..ec35386
--- /dev/null
+++ b/client/html/comment_form.tpl
@@ -0,0 +1,31 @@
+<div class='tabs'>
+ <form>
+ <div class='tabs-wrapper'><!--
+ --><div class='preview tab'><!--
+ --><div class='comment-content-wrapper'><!--
+ --><div class='comment-content'><!--
+ --><%= ctx.makeMarkdown(ctx.comment.text) %><!--
+ --></div><!--
+ --></div><!--
+ --></div><!--
+
+ --><div class='edit tab'><!--
+ --><textarea required minlength=1><%= ctx.comment.text %></textarea><!--
+ --></div><!--
+ --></div>
+
+ <nav class='buttons'>
+ <ul>
+ <li class='preview'><a href='#'>Preview</a></li>
+ <li class='edit'><a href='#'>Edit</a></li>
+ </ul>
+ </nav>
+
+ <nav class='actions'>
+ <input type='submit' class='save' value='Save'/>
+ <input type='button' class='cancel discourage' value='Cancel'/>
+ </nav>
+ </form>
+
+ <div class='messages'></div>
+</div>
diff --git a/client/html/post.tpl b/client/html/post.tpl
index 39bf9d6..d6d3030 100644
--- a/client/html/post.tpl
+++ b/client/html/post.tpl
@@ -46,6 +46,13 @@
<div class='content'>
<div class='post-container'></div>
- <div class='comments-container'></div>
+ <% if (ctx.canListComments) { %>
+ <div class='comments-container'></div>
+ <% } %>
+
+ <% if (ctx.canCreateComments) { %>
+ <h2>Add comment</h2>
+ <div class='comment-form-container'></div>
+ <% } %>
</div>
</div>

© 2015 - 2026 Jakob L. Kreuze