aboutsummaryrefslogtreecommitdiff
path: root/templates/thread.tmpl
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2019-12-21 08:36:44 +0000
committerr <r@freesoftwareextremist.com>2019-12-21 08:38:42 +0000
commit39c57a6b653a269668f459414d295e812f3628a8 (patch)
tree3b00e5ec638f592699d31562675b1b1e2d5da8c7 /templates/thread.tmpl
parentdf875381d4e2c9a0bd283acc3592cde6562f5e5e (diff)
downloadbloat-39c57a6b653a269668f459414d295e812f3628a8.tar.gz
bloat-39c57a6b653a269668f459414d295e812f3628a8.zip
Use a single form for new posts and replies
Diffstat (limited to 'templates/thread.tmpl')
-rw-r--r--templates/thread.tmpl18
1 files changed, 4 insertions, 14 deletions
diff --git a/templates/thread.tmpl b/templates/thread.tmpl
index d4c88de..9d8f650 100644
--- a/templates/thread.tmpl
+++ b/templates/thread.tmpl
@@ -3,21 +3,11 @@
<div class="page-title"> Thread </div>
{{range .Statuses}}
-{{template "status.tmpl" .}}
-{{if eq .ID $.ReplyToID}}
-<form class="timeline-post-form" action="/post" method="POST" enctype="multipart/form-data">
- <input type="hidden" name="reply_to_id" value="{{$.ReplyToID}}" />
- <label for="post-content"> reply to {{.Account.DisplayName}} </label>
- <div class="post-form-content-container">
- <textarea id="post-content" name="content" class="post-content" cols="50" rows="5">{{$.ReplyContent}}</textarea>
- </div>
- <div>
- Attachments <input id="post-file-picker" type="file" name="attachments" multiple>
- </div>
- <button type="submit"> Post </button>
-</form>
-{{end}}
+{{template "status.tmpl" .}}
+{{if $.ReplyContext}}{{if eq .ID $.ReplyContext.InReplyToID}}
+{{template "postform.tmpl" $.ReplyContext}}
+{{end}}{{end}}
{{end}}