Add quick reply

This commit is contained in:
r 2021-09-05 17:17:59 +00:00
parent 6340b60d8c
commit 816281c225
8 changed files with 96 additions and 2 deletions

View file

@ -4,6 +4,7 @@
<input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
{{if .ReplyContext}}
<input type="hidden" name="reply_to_id" value="{{.ReplyContext.InReplyToID}}" />
<input type="hidden" name="quickreply" value="{{.ReplyContext.QuickReply}}" />
<label for="post-content" class="post-form-title"> Reply to {{.ReplyContext.InReplyToName}} </label>
{{else}}
<label for="post-content" class="post-form-title"> New post </label>

12
templates/quickreply.tmpl Normal file
View file

@ -0,0 +1,12 @@
{{with $s := .Data}}
{{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
<div class="page-title"> Quick Reply </div>
{{if .Ancestor}}
{{template "status.tmpl" (WithContext .Ancestor $.Ctx)}}
{{end}}
{{template "status.tmpl" (WithContext .Status $.Ctx)}}
{{template "postform.tmpl" (WithContext $s.PostContext $.Ctx)}}
{{template "footer.tmpl"}}
{{end}}

View file

@ -35,6 +35,9 @@
<a class="more-link" href="{{.URL}}" target="_blank">
source
</a>
<a class="more-link" href="/quickreply/{{.ID}}#status-{{.ID}}">
quickreply
</a>
{{if .Muted}}
<form action="/unmuteconv/{{.ID}}" method="post" target="_self">
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">