aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/note/note.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/note/note.php')
-rw-r--r--templates/note/note.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/templates/note/note.php b/templates/note/note.php
index 0d48272..94f4895 100644
--- a/templates/note/note.php
+++ b/templates/note/note.php
@@ -113,8 +113,7 @@ if ($user != null) {
]);
?>
<div class="right">
- <?php call_template('menu_button', [], function () {
- global $note;
+ <?php call_template('menu_button', [], function () use ($note) {
$user = UserAccount::findByCurrentSession();
?>
<li>
@@ -128,7 +127,7 @@ if ($user != null) {
<span><?= __('action.share') ?></span>
</button>
</li>
- <?php if ($note->author->isLocal && ($note->author == $user?->actor || $user?->isAdmin)): ?>
+ <?php if ($note->author->isLocal && ($note->author == $user?->actor || $user?->isAdmin) && !$note->hasPage()): ?>
<li>
<button hx-get="/fragment/note/<?= $note->id ?>/edit" hx-target="closest .note" hx-swap="outerHTML">
<span class="material-symbols edit-outline"></span>