diff --git a/controllers/EditAsset.php b/controllers/EditAsset.php index bf01e16..f3ee61b 100644 --- a/controllers/EditAsset.php +++ b/controllers/EditAsset.php @@ -94,6 +94,10 @@ class EditAsset extends HTMLController $page = new EditAssetForm($asset, $thumbs); parent::__construct('Edit asset \'' . $asset->getTitle() . '\' (' . $asset->getFilename() . ') - ' . SITE_TITLE); $this->page->adopt($page); + + // Add a view button to the admin bar for photos. + if ($asset->isImage()) + $this->admin_bar->appendItem($asset->getImage()->getPageUrl(), 'View this photo'); } private function getThumbs(Asset $asset)