Allow going back to photo directly from Edit Asset screen.

This commit is contained in:
Aaron van Geffen 2020-02-18 12:47:19 +01:00 committed by Gitea
parent f193b614b7
commit 6a7defcdc9

View File

@ -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)