]> _ Git - bloomsburie.git/commitdiff
wip #7235 @4.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 9 Jan 2025 10:48:13 +0000 (11:48 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 9 Jan 2025 10:48:13 +0000 (11:48 +0100)
14 files changed:
framework/application/Bootstrap.php
framework/application/forms/CMS/Agence.php
framework/application/forms/CMS/Sub/News/News.php
framework/application/views/helpers/AgencyBlocs.php
framework/application/views/helpers/AgencyPictos.php
framework/application/views/helpers/HomeAgence.php
framework/application/views/helpers/HomeBlocs.php
framework/application/views/helpers/Intro.php [new file with mode: 0644]
framework/application/views/helpers/TextLayer.php [new file with mode: 0644]
framework/application/views/scripts/templates/agence.phtml
framework/library/CubeIT/Application.php
framework/library/CubeIT/Bootstrap/Navigation.php
framework/library/CubeIT/View/Helper/ImageSlideshowContinuous.php
less/common.less

index 855cb3687cedbf1264ebdd505ef04c57b99756cc..693bc396110d7790f4df74909f21e531775d1301 100644 (file)
@@ -119,13 +119,13 @@ class Bootstrap extends CubeIT_Bootstrap {
 
                $templates = parent::getCMSTemplates();
 
-               $templates['text'] = 'Page de texte';
-               $templates['agence'] = "L'agence";
+               $templates['text'] = 'Text page';
+               $templates['agence'] = "About us";
                $templates['realisations'] = 'Réalisations';
                $templates['Etudes de cas'] = array('casestudies' => 'Accueil des études de cas', 'casestudies_detail' => 'Détail d\'étude de cas');
                $templates['Expertises'] = array('expertises' => 'Accueil de la rubrique Expertises',
                                                 'expertise' => 'Page de détail d\'expertise');
-               $templates['news'] = 'Actualités';
+               $templates['news'] = 'News';
                $templates['contact'] = 'Contact';
 
                return $templates;
index df32a309702ef5ae7340c012c06ea0f2f729a855..2b14dceb66b855935e221de9f2468a811f2e41d0 100644 (file)
@@ -1,21 +1,33 @@
 <?php
 
-class Cubedesigners_Form_CMS_Agence extends Cubedesigners_Form_CMS_Twocolumns {
+class Cubedesigners_Form_CMS_Agence extends Cubedesigners_Form_CMS {
 
        public function init() {
                parent::init();
 
-               $pictos = new Cubedesigners_Form_CMS_Sub_Agence_Pictos();
-               $pictos->setLabel('Pictogrammes');
-               $this->addSubForm($pictos, 'pictos');
+        $titre = new CubeIT_Form_Element_Markitup('titre');
+        $titre->setLabel('Intro');
+        $this->addElement($titre);
 
-               $photo = new CubeIT_Form_Element_File_Image('photo');
-               $photo->setLabel('Photos de l\'agence');
+        $photo = new CubeIT_Form_Element_File_Image('photo');
+               $photo->setLabel('Picture');
                $this->addElement($photo);
 
+        $agence = new Cubedesigners_Form_CMS_Sub_Home_Agence();
+        $agence->setLabel("Values");
+        $this->addSubForm($agence, 'agence');
+
                $equipe = new Cubedesigners_Form_CMS_Sub_Agence_Persons();
-               $equipe->setLabel("Bloc L'équipe");
+               $equipe->setLabel("Team");
                $this->addSubForm($equipe, 'equipe');
+
+        $photo = new CubeIT_Form_Element_File_Image('photo2');
+        $photo->setLabel('Picture');
+        $this->addElement($photo);
+
+        $titre = new CubeIT_Form_Element_Markitup('text');
+        $titre->setLabel('Text');
+        $this->addElement($titre);
        }
 
 }
index 599f11ea7608780a92b08c33c16f8eb4350ebd6c..e7612ba9b9912ca50dc229701857f00122d1f96e 100644 (file)
@@ -5,7 +5,7 @@ class Cubedesigners_Form_CMS_Sub_News_News extends CubeIT_Form_List_Model {
        public function init() {
                parent::init();
 
-        $isCompactTrad = false;
+        $isCompactTrad = true;
 
         $id = new CubeIT_Form_Element_Id();
         $this->addElement($id);
index d09b8c5e96ac54737b2922bb27f5ac6783ae8cb1..93f721a0b4616c89a3da0a31e4b4788984125f9e 100644 (file)
@@ -16,7 +16,7 @@ class Cubedesigners_View_Helper_AgencyBlocs extends Zend_View_Helper_Abstract {
 //                             $res.='<div class="spacer"></div>';
 //                     }
 
-                       $image = $this->view->imageProcess()->imageProcessGetUrl($bloc['photo'], $bloc['titre'], 120, 120);
+                       $image = $this->view->imageProcess()->imageProcessGetUrl($bloc['photo'], $bloc['titre'], 92, 92);
 
                        $res.='<div class="sousbloc" itemscope itemtype="http://schema.org/Person">';
                        $res.='<span style="background:url(\'' . $image . '\') no-repeat" class="photo" itemprop="image"></span>';
index b6f3489de5286b552883159f33475fa18c3cb1ed..19cc83064a39ffd94cc8daf9e84e6a46196247f9 100644 (file)
@@ -12,7 +12,7 @@ class Cubedesigners_View_Helper_AgencyPictos extends Zend_View_Helper_Abstract {
 
         foreach ($blocs as $id => $bloc) {
 
-            $image = $this->view->imageCms($bloc['picto'], '', 70, 70, array());
+            $image = $this->view->imageCms($bloc['picto'], '', 120, 120, array());
 
             $res .= '<article>';
             $res.='<div class="sousbloc">';
index 22c7f1eb1d3659fe1dddedb3497d0a9b7da9c33a..17b4bb9adf9adf67d69f6630d3fdc398db7e2121 100644 (file)
@@ -7,7 +7,7 @@ class Cubedesigners_View_Helper_HomeAgence extends Zend_View_Helper_Abstract {
 
                $res = '<div class="blocs">';
                foreach ($blocs as $id => $bloc) {
-                       $image = $this->view->imageProcess($bloc['picto'], $bloc['titre'], 120, 120);
+                       $image = $this->view->imageProcess($bloc['picto'], $bloc['titre'], 92, 92);
                        $res .= '<div class="sousbloc">';
                        $res .= $image;
                        $res .= '<h2>' . $this->view->markupDotclear($bloc['titre']) . '</h2>';
index 5a487a5e217c6cb15e64e5e9accfdff0d3fe302a..edd52d13698e0e82e5aed8702e85613fcdddaabf 100644 (file)
@@ -14,7 +14,7 @@ class Cubedesigners_View_Helper_HomeBlocs extends Zend_View_Helper_Abstract {
 //                                     $res.='<div class="spacer"></div>';
 //                             }
 //                     }
-                       $image = $this->view->imageCms($bloc['picto'], $bloc['titre'], 120, 120);
+                       $image = $this->view->imageCms($bloc['picto'], $bloc['titre'], 92, 92);
 
             if(!empty($bloc['lien'])) {
                 $image = $this->view->linkInternal($image, $bloc['lien']);
diff --git a/framework/application/views/helpers/Intro.php b/framework/application/views/helpers/Intro.php
new file mode 100644 (file)
index 0000000..9179e88
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+class Cubedesigners_View_Helper_Intro extends Zend_View_Helper_Abstract
+{
+
+    public function intro()
+    {
+        $this->view->headLink()->appendStylesheet('/less/twocols.less');
+        $res = '<div class="twocols content">';
+        $res .= '<section>';
+
+        // Replacing <br /> tags with normal line breaks to allow for more flexible styling via CSS white-space
+        $res .= '<div class="title">' . str_replace('<br />', "\n", $this->view->markupDotclear($this->view->titre)) . '</div>';
+
+        $res .= '</section>';
+        $res .= '</div>';
+        return $res;
+    }
+
+}
diff --git a/framework/application/views/helpers/TextLayer.php b/framework/application/views/helpers/TextLayer.php
new file mode 100644 (file)
index 0000000..34b87e0
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+class Cubedesigners_View_Helper_TextLayer extends Zend_View_Helper_Abstract
+{
+
+    public function textLayer($text)
+    {
+        $this->view->headLink()->appendStylesheet('/less/twocols.less');
+        $res = '<div class="twocols content">';
+        $res .= '<section>';
+
+        // Replacing <br /> tags with normal line breaks to allow for more flexible styling via CSS white-space
+        $res .=  $this->view->markupDotclear($text);
+
+        $res .= '</section>';
+        $res .= '</div>';
+        return $res;
+    }
+
+}
index f627c352db5229d5a7c4b9748bc7dd864ffac4f4..84dcd6371b8f5917d7e289b1ce7e75c2215a5564 100644 (file)
@@ -1,19 +1,23 @@
 <?php
 $this->headScript()->addScriptAndStyle('agence');
 $this->headScript()->addScriptAndStyle('slideshow');
-echo $this->twocols();
+echo $this->intro();
 ?>
-<div class="agency-pictos mb-4vw">
-       <div class="bloc-holder content">
-               <?php echo $this->agencyPictos($this->pictos); ?>
-       </div>
-</div>
 
-<div class="agency-photo mb-4vw"><?php echo $this->imageSlideshowContinuous($this->photo, 650, array(), array('arrowspermanent' => 1)); ?></div>
 
+<div class="agency-photo mb-4vw"><?php echo $this->imageSlideshowContinuous($this->photo, 650, array(), array('arrowspermanent' => 1)); ?></div>
+<div class="agency-pictos mb-4vw">
+    <div class="bloc-holder content">
+        <?php echo $this->agencyPictos($this->pictos); ?>
+    </div>
+</div>
 <section class="agency-persons mb-4vw">
        <div class="bloc-holder content">
                <h2><?php echo ucfirst($this->equipe['titre']); ?></h2>
                <?php echo $this->agencyBlocs($this->equipe); ?>
        </div>
 </section>
+<div class="agency-photo mb-4vw"><?php echo $this->imageSlideshowContinuous($this->photo2, null, array(), array('arrowspermanent' => 1)); ?></div>
+<?php
+echo $this->textLayer($this->text);
+?>
\ No newline at end of file
index 93d33586bb82c10f5a2cdc56417b5c8399a43246..0e134cc6ddbae495bde8fa0422b617c4553432b7 100644 (file)
@@ -66,6 +66,8 @@ class CubeIT_Application extends Zend_Application
                 mkdir(CACHE_PATH . '/' . APPLICATION_ENV . '/wsdl', 0777, true);
             }
 
+            $defaultPhpSettings['opcache.enable'] = false;
+            $defaultPhpSettings['opcache.revalidate_freq'] = 0;
             if ($options['dev']) {
                 $defaultPhpSettings['opcache.enable'] = false;
                 $defaultPhpSettings['opcache.revalidate_freq'] = 0;
index 360a9f3de78a13d0cd21da1264d60b8b0190e15d..e8d8cc994deb19e1a86801c9557dcaa8129c6c56 100644 (file)
@@ -431,12 +431,12 @@ class CubeIT_Bootstrap_Navigation extends CubeIT_Bootstrap_Locale {
         */
        public function getCMSTemplates() {
                $templates = array();
-               $templates['home'] = 'Page d\'accueil';
+               $templates['home'] = 'Home page';
                $templates['Redirections'] = array(
-                       'externalredirection' => 'Redirection externe',
-                       'nextredirection' => 'Redirection vers la première sous-rubrique',
-                       'pageredirection' => 'Redirection interne',
-                       'subredirection' => 'Redirection vers une sous-rubrique');
+                       'externalredirection' => 'External redirection',
+                       'nextredirection' => 'Redirect to the first subpage',
+                       'pageredirection' => 'Internal redirection',
+                       'subredirection' => 'Redirect to a subpage');
                return $templates;
        }
 
index 59be0dc8ef763ba0e93b0ebcdb0da8b266f1939f..3058bb566f9ddc32c1f705dbd8f1deef19b3705d 100644 (file)
@@ -1,29 +1,35 @@
 <?php
 
-class CubeIT_View_Helper_ImageSlideshowContinuous extends CubeIT_View_Helper_ImageSlideshow {
+class CubeIT_View_Helper_ImageSlideshowContinuous extends CubeIT_View_Helper_ImageSlideshow
+{
 
-       public function imageSlideshowContinuous($slides, $height = 'auto', $attrs = array(), $options = array()) {
-               $options['type'] = 'continuous';
-               $options['baseHeight'] = $height;
-               return $this->imageSlideshow($slides, 'auto', $height, $attrs, $options);
-       }
+    public function imageSlideshowContinuous($slides, $height = 'auto', $attrs = array(), $options = array())
+    {
+        if (count($slides) === 1) {
+            return '<div class="fullwidthimage">'.$this->imageCms($slides[0],'', null, $height, $attrs).'</div>';
+        }
+        $options['type'] = 'continuous';
+        $options['baseHeight'] = $height;
+        return $this->imageSlideshow($slides, 'auto', $height, $attrs, $options);
+    }
 
-       protected function _makeSlide($slide, $width, $height) {
-               $slideAttrs = array('class' => 'slide', 'data-width' => $width, 'data-height' => $height, 'style' => 'width:' . $width . 'px;height:' . $height . 'px;');
+    protected function _makeSlide($slide, $width, $height)
+    {
+        $slideAttrs = array('class' => 'slide', 'data-width' => $width, 'data-height' => $height, 'style' => 'width:' . $width . 'px;height:' . $height . 'px;');
 
-               if (CubeIT_Util_Html::isHtml($slide)) {
-                       $c = $slide;
-               } else {
-                       $slideAttrs = array('class' => 'slide', 'data-width' => $width, 'data-height' => $height, 'style' => 'width:' . $width . 'px;height:' . $height . 'px;');
-                       $slideAttrs['data-image'] = CubeIT_View_Helper_ImageCms::getPath($slide);
+        if (CubeIT_Util_Html::isHtml($slide)) {
+            $c = $slide;
+        } else {
+            $slideAttrs = array('class' => 'slide', 'data-width' => $width, 'data-height' => $height, 'style' => 'width:' . $width . 'px;height:' . $height . 'px;');
+            $slideAttrs['data-image'] = CubeIT_View_Helper_ImageCms::getPath($slide);
 
-                       if (is_object($slide) && isset($slide->legend) && $slide->legend) {
-                               $slideAttrs['data-legend'] = $slide->legend;
-                       }
-                       $c = '';
-               }
+            if (is_object($slide) && isset($slide->legend) && $slide->legend) {
+                $slideAttrs['data-legend'] = $slide->legend;
+            }
+            $c = '';
+        }
 
-               return $this->view->htmlElement($c, 'div', $slideAttrs);
-       }
+        return $this->view->htmlElement($c, 'div', $slideAttrs);
+    }
 
 }
index 2665f13b705ec3ff49407adb655f2fcc51793177..534a1aa5961d24ca4810d43ccbef3d8bb93441b9 100644 (file)
@@ -53,7 +53,7 @@ h3, h4, h5, h6 {
   font-weight: 600;
 }
 
-h1,h2{
+h1, h2 {
   font-weight: 700;
 }
 
@@ -79,7 +79,7 @@ a {
     }
   }
 
-  &.animated-arrow{
+  &.animated-arrow {
     text-transform: uppercase;
   }
 
@@ -218,3 +218,10 @@ a {
   border-radius: 0;
   font-size: 18px;
 }
+
+.fullwidthimage {
+  img {
+    width: 100%;
+    height: auto;
+  }
+}
\ No newline at end of file