]> _ Git - cubedesigners-v7.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 21 Nov 2014 15:35:00 +0000 (15:35 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 21 Nov 2014 15:35:00 +0000 (15:35 +0000)
framework/application/controllers/RealisationsController.php
framework/application/forms/CMS/Realisations.php
framework/application/views/helpers/CasestudiesDetail.php
framework/application/views/helpers/CasestudiesList.php
framework/application/views/helpers/CategoriesList.php
framework/application/views/helpers/Realisation.php [new file with mode: 0644]
framework/application/views/helpers/Tags.php
framework/application/views/scripts/realisations/index.phtml
framework/application/views/scripts/studies/index.phtml
less/casestudies_detail.less

index 0cb34ad8478aee61ef0dd5dbcb9495168b0e9137..4cc1081e9ad04ca4606b031da6d676f8dc0bf552 100644 (file)
@@ -1,40 +1,37 @@
-<?php\r
-\r
-class RealisationsController extends CubeIT_Controller_PageController {\r
-\r
-    public function indexAction() {\r
-        $parent = $this->view->currentPage->getParent();\r
-\r
-        $datas = $this->getBootstrap()->getCMSDatasOfNavigationPage($parent);\r
-        $this->view->datas = $datas;\r
-\r
-        $url = $this->getRequest()->getParam('page');\r
-\r
-        $ok = false;\r
-\r
-        $db = Zend_Db_Table::getDefaultAdapter();\r
-        $s = $db->select()->from('realisations')\r
-                ->order('id ASC');\r
-        $q = $s->query();\r
-\r
-        while ($r = $q->fetch()) {\r
-            if (CubeIT_Navigation_Page::generateAutoUri($r, $datas['seourl_rea'], null) == $url) {\r
-\r
-                $this->view->casestudies_titre = $datas["titre"];\r
-                $this->view->titre = $r->titre;\r
-                $this->view->studie = $r;\r
-\r
-                $ok = true;\r
-                break;\r
-            }\r
-        }\r
-\r
-        if (!$ok) {\r
-            $this->_404();\r
-            return;\r
-        }\r
-    }\r
-\r
-}\r
-\r
-?>\r
+<?php
+
+class RealisationsController extends CubeIT_Controller_PageController {
+
+       public function indexAction() {
+               $parent = $this->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;
+               }
+       }
+
+}
index 5acb4f5687fd9b80db03f0aedb8f17d17b1a25a1..2be959d8df902e6234398cddcaf9add3fec05e8f 100644 (file)
@@ -1,23 +1,21 @@
-<?php\r
-\r
-class Cubedesigners_Form_CMS_Realisations extends Cubedesigners_Form_CMS {\r
-\r
-    public function init() {\r
-        parent::init();\r
-\r
-        $titre = new CubeIT_Form_Element_Markitup('titre');\r
-        $titre->setLabel('Titre');\r
-        $this->addElement($titre);\r
-\r
-        $reaurl = new Zend_Form_Element_Text('seourl_rea');\r
-        $reaurl->setLabel("Modèle d'URL des réalisations");\r
-        $this->addElement($reaurl);\r
-\r
-        $realisations = new Cubedesigners_Form_CMS_Element_Realisations('realisations');\r
-        $realisations->setLabel('Gestion des réalisations');\r
-        $this->addElement($realisations);\r
-    }\r
-\r
-}\r
-\r
-?>
\ No newline at end of file
+<?php
+
+class Cubedesigners_Form_CMS_Realisations extends Cubedesigners_Form_CMS {
+
+       public function init() {
+               parent::init();
+
+               $titre = new CubeIT_Form_Element_Markitup('titre');
+               $titre->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);
+       }
+
+}
index f71984db9f2a3659f90e74c5f6d2f447bbbdcdbd..b4b458c42f70a0d6da730c29946e397bafa43627 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-class Cubedesigners_View_Helper_CasestudiesDetail extends Zend_View_Helper_Abstract {
+class Cubedesigners_View_Helper_CasestudiesDetail extends CubeIT_View_Helper_Abstract {
 
        public function CasestudiesDetail($studie) {
 
@@ -45,7 +45,7 @@ class Cubedesigners_View_Helper_CasestudiesDetail extends Zend_View_Helper_Abstr
 
                                $res .= '<div class="detail-text" style="' . $margin . '' . $zindex . '" >';
                                $res .= '<div class="titre">' . $bloc->titre . '</div>';
-                               $res .= '<div class="texte">' . $bloc->texte . '</div>';
+                               $res .= $this->markupDotclear($bloc->texte);
                                $res .= '</div>';
                        }
 
index dfc93272fffe8dd089a4466cf8d8ecc88418e2d3..8f900f0b67718713dd9a28eab2b2471ff6369f75 100644 (file)
@@ -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']);
index e3f5e604d310aa4fd2ad767f5ec47d246ef7e01a..1619c5cb006f424f084db27afa02243422f435ee 100644 (file)
@@ -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 (file)
index 0000000..a438b42
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+
+class Cubedesigners_View_Helper_Realisation extends CubeIT_View_Helper_Abstract {
+
+       public function realisation($r) {
+
+               $res = '<div class="content">';
+               $res .= '<h1>' . $r->titre . '</h1>';
+               $res .= '<h2>' . Cubedesigners_Util::getCategoryById($r->categories) . '</h2>';
+               $res.='</div>';
+               $res.=$this->imageSlideshowScroll($r->visuel_detail, 545, array(), array('shortcuts' => false));
+
+               return $res;
+       }
+
+}
index 0c48af6f9596678066c410ddad2e36ed8020e707..2c1df3c5f0659932396619ed2a63d94e6ae0bdc9 100644 (file)
@@ -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');
index 069c716c09d4e50bf7c4e522f05799bfb9cc0082..8c9d0e7bf38c5b8e11d50036526650f95f0771c5 100644 (file)
@@ -1,15 +1,8 @@
-<?php\r
-$this->headScript()->addScriptAndStyle('realisations');\r
-?>\r
-\r
-<div class="casestudies-detail-title"><?php echo $this->markupDotclear($this->titre); ?></div>\r
-\r
-<?php\r
-echo $this->CasestudiesDetail($this->studie);\r
-?>\r
-\r
-<div class="title"><?php echo $this->markupDotclear($this->casestudies_titre); ?></div>\r
-\r
-<div id="casestudies-list">\r
-    <?php echo $this->CasestudiesList($this->datas); ?>\r
-</div>
\ No newline at end of file
+<?php
+
+$this->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);
index d6b9424f0f62c004e91136273c0fa89f0b666788..57c0b440550300708d8fd8793c03f4278d09b11b 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+$this->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');
 ?>
 
index cbb3319e150534287b8d1ce8ab1a0211105dda03..a56006db339d226f850d1581a9d0717b3d892714 100644 (file)
-/* Case studies detail Title */\r
-.casestudies-detail-title {\r
-    min-width: 980px;\r
-    max-width: 980px;\r
-    width:100%;\r
-    margin: 0 auto;\r
-    padding: 50px 0px 50px 0;\r
-    font-size: 32px;\r
-}\r
-\r
-/* Case studies detail visuel */\r
-#casestudies-detail-visuel {\r
-    padding-bottom:50px;\r
-    \r
-    a {\r
-        background-color: #3885e0;\r
-        border-radius: 2px;\r
-        padding: 5px 20px;\r
-        color:#fff;\r
-    }\r
-\r
-    a:hover, a:active {\r
-        background-color: #65a8f6;\r
-        color:#fff;\r
-    }\r
-\r
-    .visuel-holder {\r
-        min-width: 980px;\r
-        max-width: 980px;\r
-        width:100%;\r
-        margin: 0 auto;\r
-        overflow:hidden;\r
-    }\r
-\r
-    .visuel-holder .visuel {\r
-        width:980px;\r
-        height:400px;\r
-        padding-bottom: 20px;\r
-    }\r
-\r
-    .visuel-holder .legende {\r
-        font-size: 18px;\r
-        float:left;\r
-    }\r
-    \r
-}\r
-\r
-\r
-\r
-#casestudies-detail-content {\r
-    text-align: center;\r
-    background-color: #0194d5;\r
-    padding: 50px 0 0px 0;\r
-    \r
-    \r
-    .detail-text {\r
-        color: #fff;\r
-        width:640px;\r
-        margin:auto;\r
-        //padding: 0px 0 50px 0;\r
-        position: relative;\r
-        z-index: 10;\r
-    }\r
-\r
-    .detail-text .titre {\r
-        font-size:32px;\r
-        padding-bottom: 20px;\r
-    }\r
-\r
-    .detail-text .texte {\r
-        font-size:18px;\r
-    }\r
-\r
-    .detail-visuel {\r
-        padding: 0px 0 50px 0;\r
-        z-index: 1;\r
-    }\r
-\r
-    .detail-video-background {\r
-        /*display: table;*/\r
-        position: absolute;\r
-        top: -325px;\r
-        //left: 110px;\r
-        width:1280xp;\r
-        height:1280px;\r
-        z-index: 2;\r
-    }\r
-\r
-   .detail-video {\r
-        padding: 0px 0 50px 0;\r
-        position: relative;\r
-        z-index: 5;\r
-        text-align: center;\r
-       /* vertical-align: middle;\r
-        display: table-cell; */\r
-    }\r
-\r
-    .detail-visuel {\r
-        width:100%;\r
-        background-position: 50%;\r
-        position: relative;\r
-    }\r
-}\r
-\r
-/* max-width pour faibles résolutions */\r
-@media screen and (max-width: 1009px) {\r
-       \r
-}\r
+/* 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) {
+
+}