]> _ Git - bloomsburie.git/commitdiff
wait #7249 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 9 Jan 2025 15:11:52 +0000 (16:11 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 9 Jan 2025 15:11:52 +0000 (16:11 +0100)
framework/application/Bootstrap.php
framework/application/forms/CMS/Expertises.php [deleted file]
framework/application/forms/CMS/Services.php [new file with mode: 0644]
framework/application/forms/CMS/Twocolumns.php
framework/application/views/helpers/TextLayer.php
framework/application/views/scripts/templates/expertises.phtml [deleted file]
framework/application/views/scripts/templates/services.phtml [new file with mode: 0644]
less/02-utilities.less
less/common.less

index 693bc396110d7790f4df74909f21e531775d1301..849b21be6f3615868da8385ec978515cfa0ad400 100644 (file)
 <?php
 
-class Bootstrap extends CubeIT_Bootstrap {
-
-       //      protected $_cacheNavigation = false;
-
-       protected function _initMinimum() {
-               parent::_initMinimum();
-               // If a project with html display (don't activate by default for web services apps
-               $this->bootstrap('doctype');
-               $this->bootstrap('scripts');
-       }
-
-       protected function _initRouter($initCms = true, $standard = true) {
-               $router = parent::_initRouter($initCms, $standard);
-               $router->addStandardRoute('rss');
-               return $router;
-       }
-
-       protected function _initAcl() {
-               $acl = parent::_initAcl();
-               return $acl;
-       }
-
-       protected function _makeNavigationOnePage(&$navigation, $r, $t, $isAdmin, $locale = false) {
-               $page = parent::_makeNavigationOnePage($navigation, $r, $t, $isAdmin, $locale);
-
-               if (!$page) {
-                       return;
-               }
-
-               if ($page->getTemplate() == 'casestudies') {
-                       $this->addStudiesPages($page, $locale, $isAdmin);
-               }
-
-               if ($page->getTemplate() == 'realisations') {
-                       $this->addRealisationsPages($page, $locale, $isAdmin);
-               }
-       }
-
-       /**
-        *
-        * @param CubeIT_Navigation_Page_Locale $page
-        */
-       protected function addRealisationsPages($page, $locale, $isAdmin) {
-
-               $datas = $this->getCMSDatasOfNavigationPage($page);
-               $db = Zend_Db_Table::getDefaultAdapter();
-               $s = $db->select()->from('realisations')
-                       ->order('id ASC');
-               $q = $s->query();
-
-               while ($r = $q->fetch()) {
-                       $r = CubeIT_Util_Cms::unserialize($r, $locale);
-                       if ($r->titre == '') {
-                               continue;
-                       }
-                       $online = boolval($r->online);
-                       if (!$online && !$isAdmin) {
-                               continue;
-                       }
-
-                       $p = new CubeIT_Navigation_Page_Locale();
-                       $p->setController('Realisations');
-                       $p->setId($page->getId() . '/' . $r->id);
-                       $p->setUri(Cubedesigners_Util::generateAutoUri($r, $datas['seourl_rea'], $page->getLocale()));
-                       $p->setSitemap($online);
-                       $p->setEditable(false);
-                       $p->setOnline($online);
-                       $p->setDomain($page->getDomain());
-                       $p->setLabel($r->titre);
-                       $p->setTitle($r->titre);
-                       $p->setParams(array('realisation_id' => $r->id));
-                       $page->addPage($p);
-               }
-       }
-
-       /**
-        *
-        * @param CubeIT_Navigation_Page_Locale $page
-        */
-       protected function addStudiesPages($page, $locale, $isAdmin) {
-               $datas = $this->getCMSDatasOfNavigationPage($page);
-               $db = Zend_Db_Table::getDefaultAdapter();
-               $s = $db->select()->from('casestudies')
-                       ->order('id ASC');
-               $q = $s->query();
-
-               while ($r = $q->fetch()) {
-                       $r = CubeIT_Util_Cms::unserialize($r, $locale);
-                       if ($r->titre == '') {
-                               continue;
-                       }
-                       $online = boolval($r->online);
-                       if (!$online && !$isAdmin) {
-                               continue;
-                       }
-
-                       $p = new CubeIT_Navigation_Page_Locale();
-                       $p->setController('Studies');
-                       $p->setId($page->getId() . '/' . $r->id);
-                       $p->setAutoUri($r, $datas['seourl_stu'], $page->getLocale());
-                       $p->setSitemap($online);
-                       $p->setTitle($r->titre);
-                       $p->setEditable(false);
-                       $p->setParams(array('casestudy_id' => $r->id));
-                       $p->setOnline($online);
-                       $p->setDomain($page->getDomain());
-                       $p->setLabel($r->titre);
-                       $page->addPage($p);
-               }
-       }
-
-       /**
-        *
-        * @return array
-        */
-       public function getCMSTemplates() {
-
-               $templates = parent::getCMSTemplates();
-
-               $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'] = 'News';
-               $templates['contact'] = 'Contact';
-
-               return $templates;
-       }
-
-       /**
-        *
-        * @param Zend_Controller_Request_Http $req
-        * @return boolean|string
-        */
-       public function handleRedirections($req) {
-               $res = parent::handleRedirections($req);
-               if ($res !== false) {
-
-                       return $res;
-               }
-
-               $path = trim($req->getPathInfo(), '/ ');
-               $e = explode('/', $path);
-               $locale = array_shift($e);
-               fb($locale);
-
-               $res = '/';
-
-
-               if (!count($e)) {
-                       return $res;
-               }
-
-               if ($locale == 'references_web') {
-                       $res .= 'Portfolio';
-                       return $res;
-               }
-
-               if ($locale != 'fr' && $locale != 'en') {
-                       return false;
-               }
-
-               if ($locale == 'fr' && $_SERVER['HTTP_HOST'] == 'www.cubedesigners.com') {
-                       return 'http://www.cubedesigners.fr/' . $_SERVER['REQUEST_URI'];
-               }
-               if ($locale == 'en' && $_SERVER['HTTP_HOST'] == 'www.cubedesigners.fr') {
-                       return 'http://www.cubedesigners.com/' . $_SERVER['REQUEST_URI'];
-               }
-
-               if (count($e) == 1) {
-                       $u = $e[0];
-                       if ($u == 'en') {
-                               return $res;
-                       }
-                       if ($u == '1-Sites-internet') {
-                               $res .= 'Projets-Web';
-                       } elseif ($u == '2-Design-graphique') {
-                               $res .= 'Graphisme';
-                       } elseif ($u == '3-Design-industriel') {
-                               $res .= 'Design-industriel';
-                       } elseif ($u == '4-Multimedia-Jeux') {
-                               $res .= 'Multimedia';
-                       } elseif ($u == '5-Films-Animation') {
-                               $res .= 'Multimedia';
-                       } elseif ($u == '6-Applications-mobiles') {
-                               $res .= 'Projets-Web';
-                       } elseif ($u == '7-En-attente') {
-                               $res .= 'Graphisme';
-                       } elseif ($u == '1-Websites') {
-                               $res .= 'Web-projects';
-                       } elseif ($u == '2-Graphic-design') {
-                               $res .= 'Graphical-design';
-                       } elseif ($u == '3-Industrial-design') {
-                               $res .= 'Industrial-design';
-                       } elseif ($u == '4-Multimedia-Games') {
-                               $res .= 'Multimedia';
-                       } elseif ($u == '5-Motion-Graphics') {
-                               $res .= 'Multimedia';
-                       } elseif ($u == '6-Mobile-applications') {
-                               $res .= 'Web-projects';
-                       } elseif ($u == '7-Waiting') {
-                               $res .= 'Graphical-design';
-                       }
-
-                       return $res;
-               }
-
-               if (count($e) == 3) {
-                       if ($e[0] == 'Sites-internet') {
-                               $e[0] = 'Site-Web';
-                       } elseif ($e[0] == 'Multimedia-Jeux' || $e[0] == 'Multimedia-Games') {
-                               $e[0] = 'Multimedia';
-                       } elseif ($e[0] == 'Motion-Graphics') {
-                               $e[0] = 'Motion-graphics';
-                       } elseif ($e[0] == 'Graphic-design') {
-                               $e[0] = 'Graphic-Design';
-                       } elseif ($e[0] == 'Mobile-applications') {
-                               $e[0] = 'Websites';
-                       }
-
-                       // Projects
-                       /// Mobile-applications/Heredis/114-Heredis-App => Applications-mobiles/Heredis-Heredis-App
-                       $ee = explode('-', $e[2], 2);
-                       $id = array_shift($ee);
-                       /*$p=$this->getNavigation()->findOneBy('id',$locale.'/3/'.$id);
-                       if(null!==$p){
-                               //return $p->getHref();
-                       }*/
-
-                       $res .= $e[0] . '/' . $e[1] . '-' . implode('-', $ee);
-                       return $res;
-               }
-
-               return false;
-       }
-
-       public function run() {
-               // run have to be the last call of bootstrap
-               parent::run();
-       }
-
-       function __destroy() {
-               endProfile();
-       }
+class Bootstrap extends CubeIT_Bootstrap
+{
+
+    // protected $_cacheNavigation = false;
+
+    protected function _initMinimum()
+    {
+        parent::_initMinimum();
+        // If a project with html display (don't activate by default for web services apps
+        $this->bootstrap('doctype');
+        $this->bootstrap('scripts');
+    }
+
+    protected function _initRouter($initCms = true, $standard = true)
+    {
+        $router = parent::_initRouter($initCms, $standard);
+        $router->addStandardRoute('rss');
+        return $router;
+    }
+
+    protected function _initAcl()
+    {
+        $acl = parent::_initAcl();
+        return $acl;
+    }
+
+    protected function _makeNavigationOnePage(&$navigation, $r, $t, $isAdmin, $locale = false)
+    {
+        $page = parent::_makeNavigationOnePage($navigation, $r, $t, $isAdmin, $locale);
+
+        if (!$page) {
+            return;
+        }
+
+        if ($page->getTemplate() == 'casestudies') {
+            $this->addStudiesPages($page, $locale, $isAdmin);
+        }
+
+        if ($page->getTemplate() == 'realisations') {
+            $this->addRealisationsPages($page, $locale, $isAdmin);
+        }
+    }
+
+    /**
+     *
+     * @param CubeIT_Navigation_Page_Locale $page
+     */
+    protected function addRealisationsPages($page, $locale, $isAdmin)
+    {
+
+        $datas = $this->getCMSDatasOfNavigationPage($page);
+        $db = Zend_Db_Table::getDefaultAdapter();
+        $s = $db->select()->from('realisations')
+            ->order('id ASC');
+        $q = $s->query();
+
+        while ($r = $q->fetch()) {
+            $r = CubeIT_Util_Cms::unserialize($r, $locale);
+            if ($r->titre == '') {
+                continue;
+            }
+            $online = boolval($r->online);
+            if (!$online && !$isAdmin) {
+                continue;
+            }
+
+            $p = new CubeIT_Navigation_Page_Locale();
+            $p->setController('Realisations');
+            $p->setId($page->getId() . '/' . $r->id);
+            $p->setUri(Cubedesigners_Util::generateAutoUri($r, $datas['seourl_rea'], $page->getLocale()));
+            $p->setSitemap($online);
+            $p->setEditable(false);
+            $p->setOnline($online);
+            $p->setDomain($page->getDomain());
+            $p->setLabel($r->titre);
+            $p->setTitle($r->titre);
+            $p->setParams(array('realisation_id' => $r->id));
+            $page->addPage($p);
+        }
+    }
+
+    /**
+     *
+     * @param CubeIT_Navigation_Page_Locale $page
+     */
+    protected function addStudiesPages($page, $locale, $isAdmin)
+    {
+        $datas = $this->getCMSDatasOfNavigationPage($page);
+        $db = Zend_Db_Table::getDefaultAdapter();
+        $s = $db->select()->from('casestudies')
+            ->order('id ASC');
+        $q = $s->query();
+
+        while ($r = $q->fetch()) {
+            $r = CubeIT_Util_Cms::unserialize($r, $locale);
+            if ($r->titre == '') {
+                continue;
+            }
+            $online = boolval($r->online);
+            if (!$online && !$isAdmin) {
+                continue;
+            }
+
+            $p = new CubeIT_Navigation_Page_Locale();
+            $p->setController('Studies');
+            $p->setId($page->getId() . '/' . $r->id);
+            $p->setAutoUri($r, $datas['seourl_stu'], $page->getLocale());
+            $p->setSitemap($online);
+            $p->setTitle($r->titre);
+            $p->setEditable(false);
+            $p->setParams(array('casestudy_id' => $r->id));
+            $p->setOnline($online);
+            $p->setDomain($page->getDomain());
+            $p->setLabel($r->titre);
+            $page->addPage($p);
+        }
+    }
+
+    /**
+     *
+     * @return array
+     */
+    public function getCMSTemplates()
+    {
+
+        $templates = parent::getCMSTemplates();
+
+        $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['services'] = 'Services';
+        $templates['news'] = 'News';
+        $templates['contact'] = 'Contact';
+
+        return $templates;
+    }
+
+    /**
+     *
+     * @param Zend_Controller_Request_Http $req
+     * @return boolean|string
+     */
+    public function handleRedirections($req)
+    {
+        $res = parent::handleRedirections($req);
+        if ($res !== false) {
+
+            return $res;
+        }
+
+        $path = trim($req->getPathInfo(), '/ ');
+        $e = explode('/', $path);
+        $locale = array_shift($e);
+        fb($locale);
+
+        $res = '/';
+
+
+        if (!count($e)) {
+            return $res;
+        }
+
+        if ($locale == 'references_web') {
+            $res .= 'Portfolio';
+            return $res;
+        }
+
+        if ($locale != 'fr' && $locale != 'en') {
+            return false;
+        }
+
+        if ($locale == 'fr' && $_SERVER['HTTP_HOST'] == 'www.cubedesigners.com') {
+            return 'http://www.cubedesigners.fr/' . $_SERVER['REQUEST_URI'];
+        }
+        if ($locale == 'en' && $_SERVER['HTTP_HOST'] == 'www.cubedesigners.fr') {
+            return 'http://www.cubedesigners.com/' . $_SERVER['REQUEST_URI'];
+        }
+
+        if (count($e) == 1) {
+            $u = $e[0];
+            if ($u == 'en') {
+                return $res;
+            }
+            if ($u == '1-Sites-internet') {
+                $res .= 'Projets-Web';
+            } elseif ($u == '2-Design-graphique') {
+                $res .= 'Graphisme';
+            } elseif ($u == '3-Design-industriel') {
+                $res .= 'Design-industriel';
+            } elseif ($u == '4-Multimedia-Jeux') {
+                $res .= 'Multimedia';
+            } elseif ($u == '5-Films-Animation') {
+                $res .= 'Multimedia';
+            } elseif ($u == '6-Applications-mobiles') {
+                $res .= 'Projets-Web';
+            } elseif ($u == '7-En-attente') {
+                $res .= 'Graphisme';
+            } elseif ($u == '1-Websites') {
+                $res .= 'Web-projects';
+            } elseif ($u == '2-Graphic-design') {
+                $res .= 'Graphical-design';
+            } elseif ($u == '3-Industrial-design') {
+                $res .= 'Industrial-design';
+            } elseif ($u == '4-Multimedia-Games') {
+                $res .= 'Multimedia';
+            } elseif ($u == '5-Motion-Graphics') {
+                $res .= 'Multimedia';
+            } elseif ($u == '6-Mobile-applications') {
+                $res .= 'Web-projects';
+            } elseif ($u == '7-Waiting') {
+                $res .= 'Graphical-design';
+            }
+
+            return $res;
+        }
+
+        if (count($e) == 3) {
+            if ($e[0] == 'Sites-internet') {
+                $e[0] = 'Site-Web';
+            } elseif ($e[0] == 'Multimedia-Jeux' || $e[0] == 'Multimedia-Games') {
+                $e[0] = 'Multimedia';
+            } elseif ($e[0] == 'Motion-Graphics') {
+                $e[0] = 'Motion-graphics';
+            } elseif ($e[0] == 'Graphic-design') {
+                $e[0] = 'Graphic-Design';
+            } elseif ($e[0] == 'Mobile-applications') {
+                $e[0] = 'Websites';
+            }
+
+            // Projects
+            /// Mobile-applications/Heredis/114-Heredis-App => Applications-mobiles/Heredis-Heredis-App
+            $ee = explode('-', $e[2], 2);
+            $id = array_shift($ee);
+            /*$p=$this->getNavigation()->findOneBy('id',$locale.'/3/'.$id);
+            if(null!==$p){
+                //return $p->getHref();
+            }*/
+
+            $res .= $e[0] . '/' . $e[1] . '-' . implode('-', $ee);
+            return $res;
+        }
+
+        return false;
+    }
+
+    public function run()
+    {
+        // run have to be the last call of bootstrap
+        parent::run();
+    }
+
+    function __destroy()
+    {
+        endProfile();
+    }
 
 }
diff --git a/framework/application/forms/CMS/Expertises.php b/framework/application/forms/CMS/Expertises.php
deleted file mode 100644 (file)
index 42aecfa..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-class Cubedesigners_Form_CMS_Expertises extends Cubedesigners_Form_CMS_Twocolumns {
-
-       public function init() {
-               parent::init();
-
-
-               $citation = new CubeIT_Form_Element_Textarea('citation');
-               $citation->setLabel('Citation');
-               $citation->setAttrib('rows', 3);
-               $this->addElement($citation);
-
-               $citation_author = new Zend_Form_Element_Text('citation_author');
-               $citation_author->setLabel('Citation Author');
-               $this->addElement($citation_author);
-
-               $expertises = new Cubedesigners_Form_CMS_Sub_Home_Expertises();
-               $expertises->setLegend('Domaines d\'expertises');
-               $this->addSubForm($expertises, 'expertises');
-       }
-
-}
diff --git a/framework/application/forms/CMS/Services.php b/framework/application/forms/CMS/Services.php
new file mode 100644 (file)
index 0000000..8df93c0
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+
+class Cubedesigners_Form_CMS_Services extends Cubedesigners_Form_CMS_Twocolumns {
+
+       public function init() {
+               parent::init();
+
+        $photo = new CubeIT_Form_Element_File_Image('photo');
+        $photo->setLabel('Picture');
+        $this->addElement($photo);
+
+        $titre = new CubeIT_Form_Element_Markitup('services');
+        $titre->setLabel('Our services');
+        $this->addElement($titre);
+       }
+
+}
index 50ff2786f4e6d5775cb3e80d9ad8e54bd9764ecd..c6d79aa2ea421b3f115551586db407cdc0b89c37 100644 (file)
@@ -7,15 +7,15 @@ class Cubedesigners_Form_CMS_Twocolumns extends Cubedesigners_Form_CMS {
                parent::init();
 
                $titre = new CubeIT_Form_Element_Markitup('titre');
-               $titre->setLabel('Titre');
+               $titre->setLabel('Title');
                $this->addElement($titre);
 
                $left = new CubeIT_Form_Element_Markitup('colonnegauche');
-               $left->setLabel('Colonne gauche');
+               $left->setLabel('Left column');
                $this->addElement($left);
 
                $right = new CubeIT_Form_Element_Markitup('colonnedroite');
-               $right->setLabel('Colonne droite');
+               $right->setLabel('Right column');
                $this->addElement($right);
        }
 
index 71644a5b9d1730e6505c9f0851d99ad0671c1ea3..61c53254ca9087a0e3ada701a68072a4a06c24ae 100644 (file)
@@ -3,10 +3,10 @@
 class Cubedesigners_View_Helper_TextLayer extends Zend_View_Helper_Abstract
 {
 
-    public function textLayer($text)
+    public function textLayer($text,$class="")
     {
         $this->view->headLink()->appendStylesheet('/less/twocols.less');
-        $res = '<div class="title twocols content">';
+        $res = '<div class="title twocols content '.$class.'">';
         $res .= '<section>';
 
         // Replacing <br /> tags with normal line breaks to allow for more flexible styling via CSS white-space
diff --git a/framework/application/views/scripts/templates/expertises.phtml b/framework/application/views/scripts/templates/expertises.phtml
deleted file mode 100644 (file)
index d56e1e4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-$this->headScript()->addScriptAndStyle('expertises');
-echo $this->twocols();
-
-if(!empty($this->citation)) {
-    $citation_author = isset($this->citation_author) ? $this->htmlElement($this->citation_author, 'div', array('class' => 'citation-author')) : '';
-    $citation = $this->htmlElement($this->citation . $citation_author, 'blockquote');
-    echo $this->htmlElement($citation, 'div', array('class' => 'citation'));
-}
-
-echo $this->liste($this->expertises, true, array('id' => 'expertises'));
diff --git a/framework/application/views/scripts/templates/services.phtml b/framework/application/views/scripts/templates/services.phtml
new file mode 100644 (file)
index 0000000..06bf638
--- /dev/null
@@ -0,0 +1,10 @@
+<?php
+
+$this->headScript()->addScriptAndStyle('expertises');
+echo $this->twocols();
+
+?>
+<div class="agency-photo"><?php echo $this->imageSlideshowContinuous($this->photo, 650, array(), array('arrowspermanent' => 1)); ?></div>
+<?php
+echo $this->textLayer($this->services,'blue pb-4vw pt-4vw');
+?>
\ No newline at end of file
index 1d8651f4c776c7cf9dae925a8b976633e891b515..3fe565441be88d1ff8619043708a76a619c1e6c7 100644 (file)
 .pr-3vw { .constrain(padding-right, 3vw); }
 .pr-4vw { .constrain(padding-right, 4vw); }
 
+.pt-2vw { .constrain(padding-top, 2vw); }
+.pt-3vw { .constrain(padding-top, 3vw); }
+.pt-4vw { .constrain(padding-top, 4vw); }
+
+
 // Text Colours
 .text-white { color: #fff; }
 
index 534a1aa5961d24ca4810d43ccbef3d8bb93441b9..6a790e44a7d3a80eddcf2ffb3593a29ba79be3ae 100644 (file)
@@ -208,6 +208,15 @@ a {
 
 }
 
+.content {
+  &.blue {
+    background-color: @blue;
+    color: #fff;
+    margin:0;
+
+  }
+}
+
 // Standard select dropdown
 .form-select {
   appearance: none;
@@ -223,5 +232,6 @@ a {
   img {
     width: 100%;
     height: auto;
+    display: block;
   }
 }
\ No newline at end of file