From 8843a8cb197e71b1ca42f1ea56be5f806ad0f5b4 Mon Sep 17 00:00:00 2001 From: winter Date: Sat, 15 Mar 2025 21:26:02 +0000 Subject: implement note editing and improve display of edited note timestamps --- templates/note/note.php | 47 ++++++++++++++++------------------------------- 1 file changed, 16 insertions(+), 31 deletions(-) (limited to 'templates/note/note.php') diff --git a/templates/note/note.php b/templates/note/note.php index 7cef342..0d48272 100644 --- a/templates/note/note.php +++ b/templates/note/note.php @@ -3,7 +3,6 @@ use Digitigrade\Model\Actor; use Digitigrade\Model\InteractionKind; -use Digitigrade\Model\NotePrivacyScope; use Digitigrade\Model\UserAccount; use Digitigrade\UserSettings; @@ -17,7 +16,6 @@ if ($user != null) { $interactions = $note->getInteractionsWithAuthor($user->actor); $interKinds = array_map(fn($inter) => $inter->kind, $interactions); } -$pathToSelf = $note->getLocalUiHref(); ?>
@@ -27,40 +25,14 @@ $pathToSelf = $note->getLocalUiHref();
-
- author->displayName) ?> - - author->pronouns) && trim($note->author->pronouns) != '') { - echo htmlspecialchars($note->author->pronouns); - } ?> - - - created) - . (isset($note->modified) && $note->modified != $note->created - ? ' (' . format_datetime($note->modified) . ')' - : '' - ) ?> - - -
+ $note]); ?> inReplyTo)): ?> @@ -68,7 +40,7 @@ $pathToSelf = $note->getLocalUiHref();
- '' . htmlspecialchars($m->displayName) . '', $note->mentions ))) ?> @@ -76,6 +48,13 @@ $pathToSelf = $note->getLocalUiHref();
+ modified) && $note->modified != $note->created): ?> +
+ + modified)) ?> +
+ + summary)): ?>
summary) ?> @@ -150,6 +129,12 @@ $pathToSelf = $note->getLocalUiHref(); author->isLocal && ($note->author == $user?->actor || $user?->isAdmin)): ?> +
  • + +