From f31d2abc237958bd9f33875f20198c4510389556 Mon Sep 17 00:00:00 2001
From: winter
Date: Mon, 13 Jan 2025 20:37:34 +0000
Subject: implement replying to posts
---
templates/note.php | 15 +++++++++++++--
templates/reply_button.php | 2 ++
templates/reply_form.php | 11 +++++++++++
templates/skeleton.php | 1 +
templates/write_note_form.php | 2 +-
5 files changed, 28 insertions(+), 3 deletions(-)
create mode 100644 templates/reply_button.php
create mode 100644 templates/reply_form.php
(limited to 'templates')
diff --git a/templates/note.php b/templates/note.php
index fdc0dc8..3fc86ba 100644
--- a/templates/note.php
+++ b/templates/note.php
@@ -27,17 +27,28 @@ if ($user != null) {
?>
+ inReplyTo)): ?>
+
+
= $note->getFormattedContent('text/html') ?? htmlspecialchars($note->plainContent) ?>
$action,
'note' => $note,
'active' => in_array(InteractionKind::from($action), $interKinds)
]);
- } ?>
+ }
+ call_template('reply_button', ['note' => $note]);
+ ?>
+ $note]); ?>
\ No newline at end of file
diff --git a/templates/reply_button.php b/templates/reply_button.php
new file mode 100644
index 0000000..6b755df
--- /dev/null
+++ b/templates/reply_button.php
@@ -0,0 +1,2 @@
+
\ No newline at end of file
diff --git a/templates/reply_form.php b/templates/reply_form.php
new file mode 100644
index 0000000..84d8121
--- /dev/null
+++ b/templates/reply_form.php
@@ -0,0 +1,11 @@
+
\ No newline at end of file
diff --git a/templates/skeleton.php b/templates/skeleton.php
index 072f812..e678957 100644
--- a/templates/skeleton.php
+++ b/templates/skeleton.php
@@ -11,6 +11,7 @@ $user = Digitigrade\Model\UserAccount::findByCurrentSession();
+
diff --git a/templates/write_note_form.php b/templates/write_note_form.php
index 49fcafc..38a9993 100644
--- a/templates/write_note_form.php
+++ b/templates/write_note_form.php
@@ -1,7 +1,7 @@