From c6902150f050e042ea1cf091bef3e3d55682ba0e Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sat, 11 Mar 2023 15:17:36 +0100 Subject: [PATCH] PhotoPage: move edit button from old admin bar to widget --- controllers/ViewPhoto.php | 4 ---- templates/PhotoPage.php | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/controllers/ViewPhoto.php b/controllers/ViewPhoto.php index cff5ed6c..e46929db 100644 --- a/controllers/ViewPhoto.php +++ b/controllers/ViewPhoto.php @@ -27,10 +27,6 @@ class ViewPhoto extends HTMLController $this->handleConfirmDelete($user, $author, $photo); else $this->handleViewPhoto($user, $author, $photo); - - // Add an edit button to the admin bar. - if ($user->isAdmin()) - $this->admin_bar->appendItem(BASEURL . '/editasset/?id=' . $photo->getId(), 'Edit this photo'); } private function handleConfirmDelete(User $user, User $author, Asset $photo) diff --git a/templates/PhotoPage.php b/templates/PhotoPage.php index 772a4f99..490b2cc6 100644 --- a/templates/PhotoPage.php +++ b/templates/PhotoPage.php @@ -250,7 +250,8 @@ class PhotoPage extends Template echo '

Actions

- Delete + Edit photo + Delete photo
'; } }