From a0df3c2ca608c6634e56fff0c789e2ba2f73797f Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 21 Nov 2014 15:35:00 +0000 Subject: [PATCH] --- .../controllers/RealisationsController.php | 77 +++---- .../application/forms/CMS/Realisations.php | 44 ++-- .../views/helpers/CasestudiesDetail.php | 4 +- .../views/helpers/CasestudiesList.php | 18 +- .../views/helpers/CategoriesList.php | 2 +- .../application/views/helpers/Realisation.php | 16 ++ framework/application/views/helpers/Tags.php | 1 - .../views/scripts/realisations/index.phtml | 23 +- .../views/scripts/studies/index.phtml | 3 + less/casestudies_detail.less | 218 +++++++++--------- 10 files changed, 209 insertions(+), 197 deletions(-) create mode 100644 framework/application/views/helpers/Realisation.php diff --git a/framework/application/controllers/RealisationsController.php b/framework/application/controllers/RealisationsController.php index 0cb34ad..4cc1081 100644 --- a/framework/application/controllers/RealisationsController.php +++ b/framework/application/controllers/RealisationsController.php @@ -1,40 +1,37 @@ -view->currentPage->getParent(); - - $datas = $this->getBootstrap()->getCMSDatasOfNavigationPage($parent); - $this->view->datas = $datas; - - $url = $this->getRequest()->getParam('page'); - - $ok = false; - - $db = Zend_Db_Table::getDefaultAdapter(); - $s = $db->select()->from('realisations') - ->order('id ASC'); - $q = $s->query(); - - while ($r = $q->fetch()) { - if (CubeIT_Navigation_Page::generateAutoUri($r, $datas['seourl_rea'], null) == $url) { - - $this->view->casestudies_titre = $datas["titre"]; - $this->view->titre = $r->titre; - $this->view->studie = $r; - - $ok = true; - break; - } - } - - if (!$ok) { - $this->_404(); - return; - } - } - -} - -?> +view->currentPage->getParent(); + + $datas = $this->getBootstrap()->getCMSDatasOfNavigationPage($parent); + $this->view->datas = $datas; + + $url = $this->getRequest()->getParam('page'); + + $ok = false; + + $db = Zend_Db_Table::getDefaultAdapter(); + $s = $db->select()->from('realisations') + ->order('id ASC'); + $q = $s->query(); + + while ($r = $q->fetch()) { + if (CubeIT_Navigation_Page::generateAutoUri($r, $datas['seourl_rea'], null) == $url) { + $this->view->casestudies_titre = $datas["titre"]; + $this->view->titre = $r->titre; + $this->view->realisation = $r; + + $ok = true; + break; + } + } + + if (!$ok) { + $this->_404(); + return; + } + } + +} diff --git a/framework/application/forms/CMS/Realisations.php b/framework/application/forms/CMS/Realisations.php index 5acb4f5..2be959d 100644 --- a/framework/application/forms/CMS/Realisations.php +++ b/framework/application/forms/CMS/Realisations.php @@ -1,23 +1,21 @@ -setLabel('Titre'); - $this->addElement($titre); - - $reaurl = new Zend_Form_Element_Text('seourl_rea'); - $reaurl->setLabel("Modèle d'URL des réalisations"); - $this->addElement($reaurl); - - $realisations = new Cubedesigners_Form_CMS_Element_Realisations('realisations'); - $realisations->setLabel('Gestion des réalisations'); - $this->addElement($realisations); - } - -} - -?> \ No newline at end of file +setLabel('Titre'); + $this->addElement($titre); + + $reaurl = new Zend_Form_Element_Text('seourl_rea'); + $reaurl->setLabel("Modèle d'URL des réalisations"); + $this->addElement($reaurl); + + $realisations = new Cubedesigners_Form_CMS_Element_Realisations('realisations'); + $realisations->setLabel('Gestion des réalisations'); + $this->addElement($realisations); + } + +} diff --git a/framework/application/views/helpers/CasestudiesDetail.php b/framework/application/views/helpers/CasestudiesDetail.php index f71984d..b4b458c 100644 --- a/framework/application/views/helpers/CasestudiesDetail.php +++ b/framework/application/views/helpers/CasestudiesDetail.php @@ -1,6 +1,6 @@ '; $res .= '
' . $bloc->titre . '
'; - $res .= '
' . $bloc->texte . '
'; + $res .= $this->markupDotclear($bloc->texte); $res .= ''; } diff --git a/framework/application/views/helpers/CasestudiesList.php b/framework/application/views/helpers/CasestudiesList.php index dfc9327..8f900f0 100644 --- a/framework/application/views/helpers/CasestudiesList.php +++ b/framework/application/views/helpers/CasestudiesList.php @@ -56,18 +56,21 @@ class Cubedesigners_View_Helper_CasestudiesList extends CubeIT_View_Helper_Abstr } if ($currentStudie != null) { - if ($r->propulse == 1) + if ($r->propulse == 1) { $r->point += 10000; + } - if ($r->categories == $studieCategorie) + if ($r->categories == $studieCategorie) { $r->point += 1000; + } if (is_array($r->tags_secondaires) && is_array($currentStudie->tags_secondaires)) { if (count($r->tags_secondaires) >= 1 && count($currentStudie->tags_secondaires) >= 1) { for ($i = 0; $i < count($studieSecondaires); $i++) { - if (in_array($currentStudie->tags_secondaires[$i], $r->tags_secondaires)) + if (in_array($currentStudie->tags_secondaires[$i], $r->tags_secondaires)) { $r->point += 100; + } } } } @@ -76,8 +79,9 @@ class Cubedesigners_View_Helper_CasestudiesList extends CubeIT_View_Helper_Abstr if (count($r->technologies) >= 1 && count($currentStudie->technologies) >= 1) { for ($i = 0; $i < count($studieSecondaires); $i++) { - if (in_array($currentStudie->technologies[$i], $r->technologies)) + if (in_array($currentStudie->technologies[$i], $r->technologies)) { $r->point += 15; + } } } } @@ -135,9 +139,9 @@ class Cubedesigners_View_Helper_CasestudiesList extends CubeIT_View_Helper_Abstr protected function _case($s, $i) { $addOffline = ''; - if ($acl && $s->online == 0) { - $addOffline = 'data-offline="1"'; - } + /* if ($acl && $s->online == 0) { + $addOffline = 'data-offline="1"'; + } */ $image = $this->view->imageProcess($s->visuel, $s->titre, 300, 225); $url = CubeIT_Navigation_Page::generateAutoUri($s, $this->_datas['seourl_stu']); diff --git a/framework/application/views/helpers/CategoriesList.php b/framework/application/views/helpers/CategoriesList.php index e3f5e60..1619c5c 100644 --- a/framework/application/views/helpers/CategoriesList.php +++ b/framework/application/views/helpers/CategoriesList.php @@ -36,7 +36,7 @@ class Cubedesigners_View_Helper_CategoriesList extends Zend_View_Helper_Abstract $tags[$r->id] = $r->name; } } - $res.=$this->view->tags($tags, array('data-perline' => $itemsPerLine, 'data-list' => '#' . $listId)); + $res = $this->view->tags($tags, array('data-perline' => $itemsPerLine, 'data-list' => '#' . $listId)); return $res; } diff --git a/framework/application/views/helpers/Realisation.php b/framework/application/views/helpers/Realisation.php new file mode 100644 index 0000000..a438b42 --- /dev/null +++ b/framework/application/views/helpers/Realisation.php @@ -0,0 +1,16 @@ +'; + $res .= '

' . $r->titre . '

'; + $res .= '

' . Cubedesigners_Util::getCategoryById($r->categories) . '

'; + $res.=''; + $res.=$this->imageSlideshowScroll($r->visuel_detail, 545, array(), array('shortcuts' => false)); + + return $res; + } + +} diff --git a/framework/application/views/helpers/Tags.php b/framework/application/views/helpers/Tags.php index 0c48af6..2c1df3c 100644 --- a/framework/application/views/helpers/Tags.php +++ b/framework/application/views/helpers/Tags.php @@ -3,7 +3,6 @@ class Cubedesigners_View_Helper_Tags extends CubeIT_View_Helper_ListUnordered { function tags($tags, $attrs = array()) { - fb($attrs); $tags = CubeIT_Util_Cms::unserialize($tags); $this->addScriptAndStyle('taglist'); diff --git a/framework/application/views/scripts/realisations/index.phtml b/framework/application/views/scripts/realisations/index.phtml index 069c716..8c9d0e7 100644 --- a/framework/application/views/scripts/realisations/index.phtml +++ b/framework/application/views/scripts/realisations/index.phtml @@ -1,15 +1,8 @@ -headScript()->addScriptAndStyle('realisations'); -?> - -
markupDotclear($this->titre); ?>
- -CasestudiesDetail($this->studie); -?> - -
markupDotclear($this->casestudies_titre); ?>
- -
- CasestudiesList($this->datas); ?> -
\ No newline at end of file +headTitle($this->realisation->titre . ' // ' . $this->currentPage->getParent()->getTitle() . ' // Cubedesigners', 'SET'); +$this->headSeo()->setDescription($this->realisation->description); +$this->headOpenGraph()->setDescription($this->realisation->description); + +$this->headScript()->addScriptAndStyle('realisations'); +echo $this->realisation($this->realisation); diff --git a/framework/application/views/scripts/studies/index.phtml b/framework/application/views/scripts/studies/index.phtml index d6b9424..57c0b44 100644 --- a/framework/application/views/scripts/studies/index.phtml +++ b/framework/application/views/scripts/studies/index.phtml @@ -1,4 +1,7 @@ headTitle($this->titre . ' // ' . $this->currentPage->getParent()->getTitle() . ' // Cubedesigners', 'SET'); +$this->headSeo()->setDescription($this->studie->legende); +$this->headOpenGraph()->setDescription($this->realisation->legende); $this->headScript()->addScriptAndStyle('casestudies_detail'); ?> diff --git a/less/casestudies_detail.less b/less/casestudies_detail.less index cbb3319..a56006d 100644 --- a/less/casestudies_detail.less +++ b/less/casestudies_detail.less @@ -1,108 +1,110 @@ -/* Case studies detail Title */ -.casestudies-detail-title { - min-width: 980px; - max-width: 980px; - width:100%; - margin: 0 auto; - padding: 50px 0px 50px 0; - font-size: 32px; -} - -/* Case studies detail visuel */ -#casestudies-detail-visuel { - padding-bottom:50px; - - a { - background-color: #3885e0; - border-radius: 2px; - padding: 5px 20px; - color:#fff; - } - - a:hover, a:active { - background-color: #65a8f6; - color:#fff; - } - - .visuel-holder { - min-width: 980px; - max-width: 980px; - width:100%; - margin: 0 auto; - overflow:hidden; - } - - .visuel-holder .visuel { - width:980px; - height:400px; - padding-bottom: 20px; - } - - .visuel-holder .legende { - font-size: 18px; - float:left; - } - -} - - - -#casestudies-detail-content { - text-align: center; - background-color: #0194d5; - padding: 50px 0 0px 0; - - - .detail-text { - color: #fff; - width:640px; - margin:auto; - //padding: 0px 0 50px 0; - position: relative; - z-index: 10; - } - - .detail-text .titre { - font-size:32px; - padding-bottom: 20px; - } - - .detail-text .texte { - font-size:18px; - } - - .detail-visuel { - padding: 0px 0 50px 0; - z-index: 1; - } - - .detail-video-background { - /*display: table;*/ - position: absolute; - top: -325px; - //left: 110px; - width:1280xp; - height:1280px; - z-index: 2; - } - - .detail-video { - padding: 0px 0 50px 0; - position: relative; - z-index: 5; - text-align: center; - /* vertical-align: middle; - display: table-cell; */ - } - - .detail-visuel { - width:100%; - background-position: 50%; - position: relative; - } -} - -/* max-width pour faibles résolutions */ -@media screen and (max-width: 1009px) { - -} +/* Case studies detail Title */ +.casestudies-detail-title { + min-width: 980px; + max-width: 980px; + width:100%; + margin: 0 auto; + padding: 50px 0px 50px 0; + font-size: 32px; +} + +/* Case studies detail visuel */ +#casestudies-detail-visuel { + padding-bottom:50px; + + a { + background-color: #3885e0; + border-radius: 2px; + padding: 5px 20px; + color:#fff; + } + + a:hover, a:active { + background-color: #65a8f6; + color:#fff; + } + + .visuel-holder { + min-width: 980px; + max-width: 980px; + width:100%; + margin: 0 auto; + overflow:hidden; + } + + .visuel-holder .visuel { + width:980px; + height:400px; + padding-bottom: 20px; + } + + .visuel-holder .legende { + font-size: 18px; + float:left; + } + +} + + + +#casestudies-detail-content { + text-align: center; + background-color: #0194d5; + padding: 50px 0 0px 0; + + + .detail-text { + color: #fff; + width:640px; + margin:auto; + position: relative; + z-index: 10; + } + + .detail-text .titre { + font-size:32px; + padding-bottom: 10px; + } + + .detail-text .dotclear { + font-size:18px; + p{ + margin:10px 0 0 0; + } + } + + .detail-visuel { + padding: 0px 0 50px 0; + z-index: 1; + } + + .detail-video-background { + /*display: table;*/ + position: absolute; + top: -325px; + //left: 110px; + width:1280xp; + height:1280px; + z-index: 2; + } + + .detail-video { + padding: 0px 0 50px 0; + position: relative; + z-index: 5; + text-align: center; + /* vertical-align: middle; + display: table-cell; */ + } + + .detail-visuel { + width:100%; + background-position: 50%; + position: relative; + } +} + +/* max-width pour faibles résolutions */ +@media screen and (max-width: 1009px) { + +} -- 2.39.5