aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/note/info_line.php
diff options
context:
space:
mode:
authorwinter2025-03-15 21:26:02 +0000
committerwinter2025-03-15 21:26:02 +0000
commit8843a8cb197e71b1ca42f1ea56be5f806ad0f5b4 (patch)
tree20ca690e9bd3e4996421eb4d43c0b4fbdaf0ff95 /templates/note/info_line.php
parentd8e440b1998e5c3e33445f2ec020d261fc7fa714 (diff)
implement note editing
and improve display of edited note timestamps
Diffstat (limited to 'templates/note/info_line.php')
-rw-r--r--templates/note/info_line.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/templates/note/info_line.php b/templates/note/info_line.php
new file mode 100644
index 0000000..acc85d7
--- /dev/null
+++ b/templates/note/info_line.php
@@ -0,0 +1,28 @@
+<?php
+
+use Digitigrade\Model\NotePrivacyScope;
+
+?>
+<div class="infoLine">
+ <a class="authorName"
+ href="/@/<?= htmlspecialchars($note->author->getFullHandle()) ?>"><?= htmlspecialchars($note->author->displayName) ?></a>
+ <span class="authorPronouns">
+ <?php if (isset($note->author->pronouns) && trim($note->author->pronouns) != '') {
+ echo htmlspecialchars($note->author->pronouns);
+ } ?>
+ </span>
+ <a class="timestamp" href="<?= htmlspecialchars($note->getLocalUiHref()) ?>">
+ <?= format_datetime($note->created) ?>
+ </a>
+ <span class="privacyScope inlineIcon material-symbols <?= match ($note->privacy->scope) {
+ NotePrivacyScope::NONE => 'lock',
+ NotePrivacyScope::MUTUALS => 'group',
+ NotePrivacyScope::FOLLOWERS => 'groups',
+ NotePrivacyScope::PUBLIC => 'public'
+ } ?>" title="<?= match ($note->privacy->scope) {
+ NotePrivacyScope::NONE => __('note.privacy.scope.none'),
+ NotePrivacyScope::MUTUALS => __('note.privacy.scope.mutuals'),
+ NotePrivacyScope::FOLLOWERS => __('note.privacy.scope.followers'),
+ NotePrivacyScope::PUBLIC => __('note.privacy.scope.public')
+ } ?>"></span>
+</div> \ No newline at end of file