aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/note.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/note.php')
-rw-r--r--templates/note.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/templates/note.php b/templates/note.php
index e5c2942..74ce566 100644
--- a/templates/note.php
+++ b/templates/note.php
@@ -94,6 +94,23 @@ if ($user != null) {
'disabled' => $actionsDisabled
]);
?>
+ <div class="right">
+ <?php call_template('menu_button', [], function () {
+ global $note;
+ $user = UserAccount::findByCurrentSession();
+ ?>
+ <?php if ($note->author == $user?->actor || $user?->isAdmin): ?>
+ <li>
+ <button hx-delete="/fragment/note/<?= $note->id ?>"
+ hx-confirm="<?= __('note.action.delete.confirmation') ?>" hx-target="closest .note"
+ hx-swap="delete">
+ <span class="material-symbols delete-outline"></span>
+ <span><?= __('note.action.delete') ?></span>
+ </button>
+ </li>
+ <?php endif; ?>
+ <?php }); ?>
+ </div>
</div>
<?php call_template('reply_form', ['note' => $note]); ?>