aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2021-09-05 17:17:59 +0000
committerr <r@freesoftwareextremist.com>2021-09-05 17:33:58 +0000
commit54c42455f393c5ae8ebdb19884d40ebd9a18f755 (patch)
treedeecf729e7ba3565058dca6678e2b78805206097 /templates
parent4351155f67963b58feeba0d16bb998862ceb4d69 (diff)
downloadbloat-54c42455f393c5ae8ebdb19884d40ebd9a18f755.tar.gz
bloat-54c42455f393c5ae8ebdb19884d40ebd9a18f755.zip
Add quick reply
Diffstat (limited to 'templates')
-rw-r--r--templates/postform.tmpl1
-rw-r--r--templates/quickreply.tmpl12
-rw-r--r--templates/status.tmpl3
3 files changed, 16 insertions, 0 deletions
diff --git a/templates/postform.tmpl b/templates/postform.tmpl
index 421b118..35171a4 100644
--- a/templates/postform.tmpl
+++ b/templates/postform.tmpl
@@ -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>
diff --git a/templates/quickreply.tmpl b/templates/quickreply.tmpl
new file mode 100644
index 0000000..97ff20a
--- /dev/null
+++ b/templates/quickreply.tmpl
@@ -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}}
diff --git a/templates/status.tmpl b/templates/status.tmpl
index 7ca8192..a7cc10d 100644
--- a/templates/status.tmpl
+++ b/templates/status.tmpl
@@ -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}}">