From fecd248f8970e1f1c6f583e0b945ee897e2a0572 Mon Sep 17 00:00:00 2001 From: "stephen@cubedesigners.com" Date: Fri, 28 Aug 2015 09:12:11 +0000 Subject: [PATCH] Adjust home page, case studies, portfolio, and expertise / client pages plus many styling tweaks for the new look. --- .../application/forms/CMS/Expertises.php | 4 + .../forms/CMS/Sub/ExpertiseCategories.php | 2 +- .../forms/CMS/Sub/Home/Agence/Bloc.php | 4 + .../forms/CMS/Sub/Home/Clients/Bloc.php | 4 + .../forms/CMS/Sub/Home/Expertises/Bloc.php | 8 +- .../views/helpers/CasestudiesList.php | 9 +- .../views/helpers/FooterContact.php | 2 +- .../application/views/helpers/HomeBlocs.php | 8 +- .../views/helpers/HomeSlideshow.php | 2 +- framework/application/views/helpers/Liste.php | 11 +- .../views/helpers/RealisationsList.php | 2 +- .../views/scripts/templates/casestudies.phtml | 2 +- .../views/scripts/templates/expertise.phtml | 12 +- .../views/scripts/templates/expertises.phtml | 8 +- .../views/scripts/templates/home.phtml | 14 ++- .../scripts/templates/realisations.phtml | 2 +- js/header.js | 2 +- less/casestudies.less | 111 +++++++++++++----- less/common.less | 24 ++-- less/expertises.less | 38 ++++-- less/footer.less | 1 + less/header.less | 2 +- less/home.less | 20 +++- less/list.less | 24 ++-- less/realisations.less | 7 +- less/twocols.less | 8 +- 26 files changed, 234 insertions(+), 97 deletions(-) diff --git a/framework/application/forms/CMS/Expertises.php b/framework/application/forms/CMS/Expertises.php index 5d5002f..42aecfa 100644 --- a/framework/application/forms/CMS/Expertises.php +++ b/framework/application/forms/CMS/Expertises.php @@ -11,6 +11,10 @@ class Cubedesigners_Form_CMS_Expertises extends Cubedesigners_Form_CMS_Twocolumn $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/Sub/ExpertiseCategories.php b/framework/application/forms/CMS/Sub/ExpertiseCategories.php index 837ddcd..183358f 100644 --- a/framework/application/forms/CMS/Sub/ExpertiseCategories.php +++ b/framework/application/forms/CMS/Sub/ExpertiseCategories.php @@ -6,7 +6,7 @@ class Cubedesigners_Form_CMS_Sub_ExpertiseCategories extends CubeIT_Form_SubForm parent::init(); $titre = new Zend_Form_Element_Text('title'); - $titre->setLabel('Expertise Titre'); + $titre->setLabel('Case Studies sous-titre'); $this->addElementLocalized($titre); $categories = new Cubedesigners_Form_Element_CategoriesCheckboxes('categories'); diff --git a/framework/application/forms/CMS/Sub/Home/Agence/Bloc.php b/framework/application/forms/CMS/Sub/Home/Agence/Bloc.php index 39c0f0e..7e6b859 100644 --- a/framework/application/forms/CMS/Sub/Home/Agence/Bloc.php +++ b/framework/application/forms/CMS/Sub/Home/Agence/Bloc.php @@ -9,6 +9,10 @@ class Cubedesigners_Form_CMS_Sub_Home_Agence_Bloc extends CubeIT_Form_SubForm { $titre->setLabel('Titre du bloc'); $this->addElement($titre); + $page = new CubeIT_Form_Element_Page('lien'); + $page->setLabel('Lien vers'); + $this->addElement($page); + $texte = new CubeIT_Form_Element_Markitup_Basic('texte'); $texte->setLabel('Texte'); $this->addElement($texte); diff --git a/framework/application/forms/CMS/Sub/Home/Clients/Bloc.php b/framework/application/forms/CMS/Sub/Home/Clients/Bloc.php index ca99f4e..e9a360d 100755 --- a/framework/application/forms/CMS/Sub/Home/Clients/Bloc.php +++ b/framework/application/forms/CMS/Sub/Home/Clients/Bloc.php @@ -9,6 +9,10 @@ class Cubedesigners_Form_CMS_Sub_Home_Clients_Bloc extends CubeIT_Form_SubForm { $titre->setLabel('Titre du bloc'); $this->addElement($titre); + $page = new CubeIT_Form_Element_Page('lien'); + $page->setLabel('Lien vers'); + $this->addElement($page); + $texte = new CubeIT_Form_Element_Markitup_Basic('texte'); $texte->setLabel('Texte'); $this->addElement($texte); diff --git a/framework/application/forms/CMS/Sub/Home/Expertises/Bloc.php b/framework/application/forms/CMS/Sub/Home/Expertises/Bloc.php index 4a87522..05d71ae 100644 --- a/framework/application/forms/CMS/Sub/Home/Expertises/Bloc.php +++ b/framework/application/forms/CMS/Sub/Home/Expertises/Bloc.php @@ -9,6 +9,10 @@ class Cubedesigners_Form_CMS_Sub_Home_Expertises_Bloc extends CubeIT_Form_SubFor $titre->setLabel('Titre du bloc'); $this->addElement($titre); + $page = new CubeIT_Form_Element_Page('lien'); + $page->setLabel('Lien vers'); + $this->addElement($page); + $texte = new CubeIT_Form_Element_Markitup_Basic('texte'); $texte->setLabel('Texte'); $this->addElement($texte); @@ -17,10 +21,6 @@ class Cubedesigners_Form_CMS_Sub_Home_Expertises_Bloc extends CubeIT_Form_SubFor $picto->setLabel('Pictogramme'); $picto->setMaxItems(1); $this->addElement($picto); - - $page = new CubeIT_Form_Element_Page('lien'); - $page->setLabel('Lien vers'); - $this->addElement($page); } } diff --git a/framework/application/views/helpers/CasestudiesList.php b/framework/application/views/helpers/CasestudiesList.php index 09b5ce8..35a93c4 100644 --- a/framework/application/views/helpers/CasestudiesList.php +++ b/framework/application/views/helpers/CasestudiesList.php @@ -152,10 +152,13 @@ class Cubedesigners_View_Helper_CasestudiesList extends CubeIT_View_Helper_Abstr $addOffline = 'data-offline="1"'; } */ - $image = $this->view->imageProcess($s->visuel, $s->titre, 318, 318); - $url = Cubedesigners_Util::generateAutoUri($s, $this->_datas['seourl_stu']); + // Max display size is 318 but we over-sample the size by 20% because there is a CSS scale effect on hover + $image = $this->view->imageProcess($s->visuel, $s->titre, 382, 382); + $url = Cubedesigners_Util::generateAutoUri($s, $this->_datas['seourl_stu']); - $c = $image; + $c = '
'; + $c.= $image; + $c.= '
'; $c.= '

' . $s->titre . '

'; $c.='

' . $s->description . '

'; diff --git a/framework/application/views/helpers/FooterContact.php b/framework/application/views/helpers/FooterContact.php index c02f800..fca2e59 100644 --- a/framework/application/views/helpers/FooterContact.php +++ b/framework/application/views/helpers/FooterContact.php @@ -18,7 +18,7 @@ class Cubedesigners_View_Helper_FooterContact extends Zend_View_Helper_Abstract $res.='
'; $res.='

' . __('Tel') . ' ' . $this->view->linkPhone($bureau['coordonnees']['tel']) . '

'; - $res.='

' . __('Fax') . ' ' . $this->view->linkPhone($bureau['coordonnees']['fax']) . '

'; + //$res.='

' . __('Fax') . ' ' . $this->view->linkPhone($bureau['coordonnees']['fax']) . '

'; $res.='
'; //$res.= $this->view->microdataPlace($bureau['coordonnees']['adresse']); diff --git a/framework/application/views/helpers/HomeBlocs.php b/framework/application/views/helpers/HomeBlocs.php index d3ec6bf..f9ba244 100644 --- a/framework/application/views/helpers/HomeBlocs.php +++ b/framework/application/views/helpers/HomeBlocs.php @@ -15,11 +15,17 @@ class Cubedesigners_View_Helper_HomeBlocs extends Zend_View_Helper_Abstract { // } // } $image = $this->view->imageCms($bloc['picto'], $bloc['titre'], 120, 120); + + if(!empty($bloc['lien'])) { + $image = $this->view->linkInternal($image, $bloc['lien']); + } + $res .= '
'; $res.= $image; $res.= '
'; - $res.= '

' . $bloc['titre'] . '

'; + $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(__('En savoir plus'), $bloc['lien'], array('class' => 'but')); diff --git a/framework/application/views/helpers/HomeSlideshow.php b/framework/application/views/helpers/HomeSlideshow.php index 04645a2..dcfe2c7 100644 --- a/framework/application/views/helpers/HomeSlideshow.php +++ b/framework/application/views/helpers/HomeSlideshow.php @@ -23,7 +23,7 @@ class Cubedesigners_View_Helper_HomeSlideshow extends CubeIT_View_Helper_Abstrac $time = $slide['time'] * 1000; } - $attributes['style'] = 'background-image:url("/images/slideshow/pattern.png"),url("' . CubeIT_View_Helper_ImageCms::getPath($slide['image']) . '");'; + $attributes['style'] = 'background-image:url("' . CubeIT_View_Helper_ImageCms::getPath($slide['image']) . '");'; $attributes['data-time'] = $time; $attributes['class'] = 'slide'; $link = $slide['lien']; diff --git a/framework/application/views/helpers/Liste.php b/framework/application/views/helpers/Liste.php index 266af9e..13edc64 100644 --- a/framework/application/views/helpers/Liste.php +++ b/framework/application/views/helpers/Liste.php @@ -9,7 +9,16 @@ class Cubedesigners_View_Helper_Liste extends CubeIT_View_Helper_Abstract { $this->view->headLink()->appendStylesheet('/less/list.less'); $res = '
'; if ($items['titre']) { - $res .= '

' . ucfirst($items['titre']) . '

'; + $t = '

' . ucfirst($items['titre']) . '

'; + + // Link title if applicable + if ($items['button']['label']) { + $title_link = $items['button']; // Copy the button details + $title_link['label'] = $t; // Override the title of the link + $res .= $this->view->linkCMS($title_link); + } else { + $res .= $t; // no link on the title + } } $res .= $this->view->homeBlocs($items, $displayDetailsButtons, $cols); if ($items['button']['label']) { diff --git a/framework/application/views/helpers/RealisationsList.php b/framework/application/views/helpers/RealisationsList.php index 67f5d4e..64d2c35 100644 --- a/framework/application/views/helpers/RealisationsList.php +++ b/framework/application/views/helpers/RealisationsList.php @@ -31,7 +31,7 @@ class Cubedesigners_View_Helper_RealisationsList extends CubeIT_View_Helper_Abst //$visuel = $this->view->imageProcess($r->visuel_detail, '', null, 440); $rea = '
'; - $rea .= $this->view->imageProcess($r->visuel, $r->titre, 236, 236); + $rea .= $this->view->imageProcess($r->visuel, $r->titre, 284, 284); $rea .= '
'; // fb($r, 'r'); $rea.= '
'; diff --git a/framework/application/views/scripts/templates/casestudies.phtml b/framework/application/views/scripts/templates/casestudies.phtml index 375f9bf..0779798 100644 --- a/framework/application/views/scripts/templates/casestudies.phtml +++ b/framework/application/views/scripts/templates/casestudies.phtml @@ -7,7 +7,7 @@ $this->headScript()->addScriptAndStyle('casestudies');
CategoriesList('casestudies', 'casestudies-list', 300, 40); + echo $this->CategoriesList('casestudies', 'casestudies-list', 382, 13); ?>
diff --git a/framework/application/views/scripts/templates/expertise.phtml b/framework/application/views/scripts/templates/expertise.phtml index 73a441c..6a6aaff 100644 --- a/framework/application/views/scripts/templates/expertise.phtml +++ b/framework/application/views/scripts/templates/expertise.phtml @@ -2,17 +2,23 @@ $this->headScript()->addScriptAndStyle('expertises'); echo $this->twocols(); -echo $this->htmlElement($this->citation, 'blockquote', array('class' => 'citation content')); + +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'), 1); $casestudy_page_data = Bootstrap::getInstance()->getCMSDatasOfPage(4); // Fetch page details - needed for the SEO URL to build links $expertise = CubeIT_Util_Cms::unserialize($this->expertises); -echo '