From 39fcc5d52ac4c6e76ff87d95ef5b4b63300fe071 Mon Sep 17 00:00:00 2001 From: winter Date: Sat, 22 Mar 2025 19:41:55 +0000 Subject: implement editing pages --- templates/note/note.php | 5 ++-- templates/pages/editable.php | 39 ++++++++++++++++++++++++++++++ templates/pages/page.php | 23 +----------------- templates/pages/page_item.php | 55 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+), 25 deletions(-) create mode 100644 templates/pages/editable.php create mode 100644 templates/pages/page_item.php (limited to 'templates') 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) { ]); ?>
-
  • @@ -128,7 +127,7 @@ if ($user != null) {
  • - author->isLocal && ($note->author == $user?->actor || $user?->isAdmin)): ?> + author->isLocal && ($note->author == $user?->actor || $user?->isAdmin) && !$note->hasPage()): ?>
  • + +
  • + + \ No newline at end of file diff --git a/templates/pages/page.php b/templates/pages/page.php index 97cea6d..4babb9d 100644 --- a/templates/pages/page.php +++ b/templates/pages/page.php @@ -13,27 +13,6 @@ call_template('skeleton', [ 'ogHandle' => '@' . $note->author->getFullHandle(true) ], function () use ($note, $page) { ?>
    -
    -

    title) ?>

    - - $note->author]); ?> - ' . htmlspecialchars($note->author->displayName) . '' - ) ?> - -
    - created)) ?> -
    - modified) && $note->modified != $note->created): ?> -
    - modified)) ?> -
    - -
    -
    - getBestContentAsHtml() ?> -
    -
    + $note, 'page' => $page]); ?>
    +
    + +
    +
    + getBestContentAsHtml() ?> +
    +
    \ No newline at end of file -- cgit v1.3