From ca0434f14e523b47113660127366acec5b6d351a Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 9 Jan 2025 15:14:26 +0100 Subject: [PATCH] wait #7235 @1 --- framework/application/forms/CMS/Agence.php | 4 ++ .../application/views/helpers/HomeBlocs.php | 60 ++++++++++--------- .../views/scripts/templates/agence.phtml | 5 ++ 3 files changed, 41 insertions(+), 28 deletions(-) diff --git a/framework/application/forms/CMS/Agence.php b/framework/application/forms/CMS/Agence.php index 2b14dce..e60ba61 100644 --- a/framework/application/forms/CMS/Agence.php +++ b/framework/application/forms/CMS/Agence.php @@ -9,6 +9,10 @@ class Cubedesigners_Form_CMS_Agence extends Cubedesigners_Form_CMS { $titre->setLabel('Intro'); $this->addElement($titre); + $blocs = new Cubedesigners_Form_CMS_Sub_Home_Agence_Blocs('figures'); + $blocs->setLegend('Figures'); + $this->addSubForm($blocs, 'figures'); + $photo = new CubeIT_Form_Element_File_Image('photo'); $photo->setLabel('Picture'); $this->addElement($photo); diff --git a/framework/application/views/helpers/HomeBlocs.php b/framework/application/views/helpers/HomeBlocs.php index 980cf28..cc3a916 100644 --- a/framework/application/views/helpers/HomeBlocs.php +++ b/framework/application/views/helpers/HomeBlocs.php @@ -1,46 +1,50 @@ '; // } // } - $image = $this->view->imageCms($bloc['picto'], $bloc['titre'], $pictoSize, $pictoSize); + $image = $this->view->imageCms($bloc['picto'], $bloc['titre'], $pictoSize, $pictoSize); - if(!empty($bloc['lien'])) { + if (!empty($bloc['lien'])) { $image = $this->view->linkInternal($image, $bloc['lien']); } - $res .= '
'; - $res.= $image; + $res .= '
'; + $res .= $image; - $res.= '
'; + $res .= '
'; $titre = !empty($bloc['lien']) ? $this->view->linkInternal($bloc['titre'], $bloc['lien']) : $bloc['titre']; - $res.= '

' . $titre . '

'; - $res.=$this->view->markupDotclear($bloc['texte']); - if ($displayDetailsButton && isset($bloc['lien']) && $bloc['lien']) { - $res.=$this->view->linkInternal($this->view->linkArrow(__('En savoir plus')), $bloc['lien'], array('class' => 'animated-arrow mt-6')); - } - $res.='
'; - $res .= '
'; - $i++; - } - - $class = array('blocs'); - if ($cols == 2) { - $class[] = 'two'; - } - - return $this->view->htmlElement($res, 'div', array('class' => $class)); - } + $res .= '

' . $titre . '

'; + $res .= $this->view->markupDotclear($bloc['texte']); + if ($displayDetailsButton && isset($bloc['lien']) && $bloc['lien']) { + $res .= $this->view->linkInternal($this->view->linkArrow(__('En savoir plus')), $bloc['lien'], array('class' => 'animated-arrow mt-6')); + } + $res .= ''; + $res .= '
'; + $i++; + } + + $class = array('blocs'); + if ($cols == 2) { + $class[] = 'two'; + } + + return $this->view->htmlElement($res, 'div', array('class' => $class)); + } } diff --git a/framework/application/views/scripts/templates/agence.phtml b/framework/application/views/scripts/templates/agence.phtml index ef8c7c0..75c481f 100644 --- a/framework/application/views/scripts/templates/agence.phtml +++ b/framework/application/views/scripts/templates/agence.phtml @@ -3,6 +3,11 @@ $this->headScript()->addScriptAndStyle('agence'); $this->headScript()->addScriptAndStyle('slideshow'); echo $this->intro(); ?> +
+ homeBlocs($this->figures); + ?> +
imageSlideshowContinuous($this->photo, 650, array(), array('arrowspermanent' => 1)); ?>
-- 2.39.5