From 80d30b5369faafbfa5103573dd6c64042815398f Mon Sep 17 00:00:00 2001 From: buttle Date: Tue, 20 Jul 2021 11:49:59 +0200 Subject: [PATCH] recovers header image on item and media pages --- view/layout/layout.phtml | 2 +- view/omeka/site/item/show.phtml | 35 ++++++++++++++------------------ view/omeka/site/media/show.phtml | 33 +++++++++++++----------------- 3 files changed, 30 insertions(+), 40 deletions(-) diff --git a/view/layout/layout.phtml b/view/layout/layout.phtml index 8857413..02acb2f 100644 --- a/view/layout/layout.phtml +++ b/view/layout/layout.phtml @@ -93,7 +93,7 @@ endif; diff --git a/view/omeka/site/item/show.phtml b/view/omeka/site/item/show.phtml index 0ab1d1c..a4859d8 100644 --- a/view/omeka/site/item/show.phtml +++ b/view/omeka/site/item/show.phtml @@ -7,34 +7,29 @@ $itemMedia = $item->media(); $showLayout = $this->themeSetting('show_layout'); ?> - + pages(); -// set header image -$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site); -if (!$img_src) { - $img_src = '/themes/archive/asset/img/default-header-image.jpg'; -} -if ($this->site->title() == "Collections") { - $image_height = "300px"; -} else { - $image_height = "200px"; -} +$img_src = null; + $img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site); + if (!$img_src) { + $img_src = $this->assetUrl('img/ARC-HIVE-logo.svg'); + } + ?> + + - - + +
diff --git a/view/omeka/site/media/show.phtml b/view/omeka/site/media/show.phtml index 0a2202b..7f0cd2a 100644 --- a/view/omeka/site/media/show.phtml +++ b/view/omeka/site/media/show.phtml @@ -3,33 +3,28 @@ $translate = $this->plugin('translate'); ?> htmlElement('body')->appendAttribute('class', 'media resource show'); ?> - + pages(); -$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site); -if (!$img_src) { - $img_src = '/themes/archive/asset/img/default-header-image.jpg'; -} -if ($this->site->title() == "Collections") { - $image_height = "300px"; -} else { - $image_height = "200px"; -} +$img_src = null; + $img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site); + if (!$img_src) { + $img_src = $this->assetUrl('img/ARC-HIVE-logo.svg'); + } + ?> + + - - +
-- 2.39.5