From d79a3f27473469e32ac0d481607186a84b86461b Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 1 Oct 2013 15:58:09 +0000 Subject: [PATCH] --- .ovhconfig | 4 ++-- framework/application/forms/Settings.php | 7 ++++++- framework/application/views/helpers/Topimage.php | 9 ++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.ovhconfig b/.ovhconfig index 77f6bef..cbd0e2f 100644 --- a/.ovhconfig +++ b/.ovhconfig @@ -1,2 +1,2 @@ -app.engine=phpcgi -app.engine.version=AUTO \ No newline at end of file +app.engine=php +app.engine.version=5.5 \ No newline at end of file diff --git a/framework/application/forms/Settings.php b/framework/application/forms/Settings.php index 1fb25ed..d3cef31 100644 --- a/framework/application/forms/Settings.php +++ b/framework/application/forms/Settings.php @@ -15,9 +15,14 @@ class CCGM_Form_Settings extends CubeIT_Form_Settings { $description->setLabel('Description de la page par défaut'); $this->addElementLocalized($description); + $topimage = new CubeIT_Form_Element_File_Image('topimage'); + $topimage->setLabel('Bandeau de haut de page par défaut'); + $topimage->setMaxItems(1); + $this->addElement($topimage); + $footer = new CCGM_Form_CMS_Sub_Footer(); $footer->setLegend('Contenus du pied de page'); - $this->addSubForm($footer,'footer'); + $this->addSubForm($footer, 'footer'); $copyright = new Zend_Form_Element_Text('copyright'); $copyright->setLabel('Copyright'); diff --git a/framework/application/views/helpers/Topimage.php b/framework/application/views/helpers/Topimage.php index d19bec3..3394f12 100644 --- a/framework/application/views/helpers/Topimage.php +++ b/framework/application/views/helpers/Topimage.php @@ -6,9 +6,16 @@ class CCGM_View_Helper_Topimage extends Zend_View_Helper_Abstract { if (!$this->view->showtopimage) { return ''; } + + if (!isset($this->view->topimage) || CubeIT_Util_Array::implodeMulti('', $this->view->topimage) == '') { + $topimage = $this->view->imageCms($this->view->options['topimage'], '', 1400, 215); + } else { + $topimage = $this->view->imageCms($this->view->topimage, '', 1400, 215); + } + $res = '
'; $res.='
'; - $res.='
image description
'; + $res.='
' . $topimage . '
'; $res.='
'; $res.='
'; return $res; -- 2.39.5