aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/note
diff options
context:
space:
mode:
authorwinter2025-03-22 19:41:55 +0000
committerwinter2025-03-22 19:41:55 +0000
commit39fcc5d52ac4c6e76ff87d95ef5b4b63300fe071 (patch)
tree75b83a228906064e80160359a76fa3820a9449eb /templates/note
parentb535baf69b9a2525bc8a33b9c96460b84af8e6e2 (diff)
implement editing pages
Diffstat (limited to 'templates/note')
-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>