diff options
| author | winter | 2025-01-13 20:37:34 +0000 |
|---|---|---|
| committer | winter | 2025-01-13 20:37:34 +0000 |
| commit | f31d2abc237958bd9f33875f20198c4510389556 (patch) | |
| tree | 57c0920666ca052d8850824ad47b326631764aa6 /templates/note.php | |
| parent | fb9efd9f4682f528b1832622d192b9b5544584a9 (diff) | |
implement replying to posts
Diffstat (limited to 'templates/note.php')
| -rw-r--r-- | templates/note.php | 15 |
1 files changed, 13 insertions, 2 deletions
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) { ?> </a> </div> + <?php if (isset($note->inReplyTo)): ?> + <div class="replyInfo"> + <a href="/@/<?= $note->inReplyTo->author->getFullHandle() ?>/note/<?= $note->inReplyTo->id ?>"> + <?= sprintf(__('note.info.replyTo'), + '<b>' . $note->inReplyTo->author->displayName) . '</b>' ?> + </a> + </div> + <?php endif; ?> <div class="content"> <?= $note->getFormattedContent('text/html') ?? htmlspecialchars($note->plainContent) ?> </div> <div class="buttons"> <?php foreach (['like', 'dislike', 'reshare'] as $action) { - render_template('interaction_button', [ + call_template('interaction_button', [ 'action' => $action, 'note' => $note, 'active' => in_array(InteractionKind::from($action), $interKinds) ]); - } ?> + } + call_template('reply_button', ['note' => $note]); + ?> </div> + <?php call_template('reply_form', ['note' => $note]); ?> </div> </article>
\ No newline at end of file |
