]> _ Git - cubedesigners-v7.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 21 Nov 2014 20:30:52 +0000 (20:30 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 21 Nov 2014 20:30:52 +0000 (20:30 +0000)
19 files changed:
.htaccess
framework/application/Bootstrap.php
framework/application/Cubedesigners/Util.php
framework/application/controllers/RealisationsController.php
framework/application/forms/Settings.php
framework/application/views/helpers/CasestudiesDetail.php
framework/application/views/helpers/CasestudiesList.php
framework/application/views/helpers/HomeSlideshow.php
framework/application/views/helpers/Realisation.php
framework/application/views/helpers/RealisationsList.php
framework/application/views/scripts/realisations/index.phtml
framework/application/views/scripts/studies/index.phtml
js/slideshow.js
less/casestudies.less
less/casestudies_detail.less
less/common.less
less/mixins.less [new file with mode: 0644]
less/realisation.less [new file with mode: 0644]
less/slideshow.less

index bd79eccd17b40bbe5af8fae1f6905ed36fe9956e..47155715bee48b7b30b0851623c1fdf725d7db94 100644 (file)
--- a/.htaccess
+++ b/.htaccess
        SetEnv SESSION_USE_TRANS_SID 0
 </IfModule>
 
-# Rewrite for Zend Framework  
+# Rewrite for Zend Framework
 <IfModule mod_rewrite.c>
        Options +FollowSymlinks
        RewriteEngine on
        RewriteBase /
        # Redirection to www. subdomain
-       RewriteCond %{HTTP_HOST} ^example.com$
-       RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
+       RewriteCond %{HTTP_HOST} ^cubedesigners.fr$
+       RewriteRule ^(.*)$ http://www.cubedesigners.fr/$1 [R=301,L]
        # Redirect auth header to env
        RewriteRule ^.*$ - [E=REMOTE_USER:%{HTTP:Authorization}]
        # Skip static files
 <IfModule mod_deflate.c>
        SetOutputFilter DEFLATE
        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|swf|zip|exe|mp3|f4v|mp4|flv|gz|pdf|swc|ogv|ogm|ogg|webm|svgz|eot|otf|ttf|woff)$ no-gzip dont-vary
-       
+
        <IfModule mod_headers.c>
                Header append Vary User-Agent
        </IfModule>
-       
+
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
index f738e2ccb31e2494999863c3fa4fe8a9be2b46c1..a0ba199f6fd6ee1df41f9556436373cda3f603a5 100644 (file)
@@ -60,7 +60,7 @@ class Bootstrap extends CubeIT_Bootstrap {
                        $p = new CubeIT_Navigation_Page_Locale();
                        $p->setController('Realisations');
                        $p->setId($page->getId() . '/' . $r->id);
-                       $p->setAutoUri($r, $datas['seourl_rea'], $page->getLocale());
+                       $p->setUri(Cubedesigners_Util::generateAutoUri($r, $datas['seourl_rea'], $page->getLocale()));
                        $p->setSitemap(true);
                        $p->setEditable(false);
 
index 05cdf9bafa38bc9af7a53218447156d8185962b6..5b247bb41673467c48482065eeaf9f41caeedd89 100644 (file)
@@ -6,9 +6,20 @@ class Cubedesigners_Util {
 
        public static function getCategoryById($id) {
                self::_getCategories();
+               if (!isset(self::$_categories[$id])) {
+                       return;
+               }
                return CubeIT_Util_Cms::unserialize(self::$_categories[$id]->getName());
        }
 
+       public static function generateAutoUri($datas, $template, $locale = null) {
+               $datas = CubeIT_Util_Cms::unserialize($datas, $locale);
+               if (isset($datas->categories)) {
+                       $datas->categories = self::getCategoryById($datas->categories);
+               }
+               return CubeIT_Navigation_Page::generateAutoUri($datas, $template, $locale);
+       }
+
        protected static function _getCategories() {
                if (null !== self::$_categories) {
                        return;
index 4cc1081e9ad04ca4606b031da6d676f8dc0bf552..d5da89d82a64725ff258f9cdca49599b8cddaae2 100644 (file)
@@ -8,30 +8,14 @@ class RealisationsController extends CubeIT_Controller_PageController {
                $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;
-               }
+               $r = new Cubedesigners_Model_Realisation();
+               $r->selectById($this->getParam('realisation_id'));
+               $r = $r->toObject();
+
+               $u = Cubedesigners_Util::generateAutoUri($r, $datas['seourl_rea'], null);
+               $this->view->casestudies_titre = $datas["titre"];
+               $this->view->titre = $r->titre;
+               $this->view->realisation = $r;
        }
 
 }
index 2275cd46a47cb011d208a357ea09f1f8da39eee9..8966e058a69f724003c2fa47eb6c2b0e528ad759 100644 (file)
@@ -7,6 +7,11 @@ class Cubedesigners_Form_Settings extends CubeIT_Form_Settings {
 
                $this->setTitle('Edition des paramètres du site');
 
+               $locales = new CubeIT_Form_Element_LocalesMultiCheckbox('localesEnabled');
+               $locales->setLabel('Langues actives');
+               $this->addElement($locales);
+
+
                $longTitle = new Zend_Form_Element_Text('longTitle');
                $longTitle->setLabel('Titre long par défaut (limité à 65 caractères)');
                $longTitle->setAttrib('maxlength', 65);
index b4b458c42f70a0d6da730c29946e397bafa43627..1dd1474e3d5b6d423329a1bda3eba74345d143fe 100644 (file)
@@ -6,7 +6,13 @@ class Cubedesigners_View_Helper_CasestudiesDetail extends CubeIT_View_Helper_Abs
 
                $visuel_detail = $this->view->imageProcess($studie->visuel_detail, $studie->titre, 980, 400);
 
-               $res = '<div id="casestudies-detail-visuel">';
+               $res = '<article class="case">';
+               $res.='<div class="content">';
+               $res.='<h1>' . $studie->titre . '</h1>';
+               $res.='<h2>' . $studie->description . '</h2>';
+               $res.='</div>';
+
+               $res .= '<div id="casestudies-detail-visuel">';
                $res .= '<div class="visuel-holder">';
                $res .= '<div class="visuel">' . $visuel_detail . '</div>';
 
@@ -86,6 +92,7 @@ class Cubedesigners_View_Helper_CasestudiesDetail extends CubeIT_View_Helper_Abs
                        }
                }
                $res .= '</div>';
+               $res .= '</article>';
 
                return $res;
        }
index 8f900f0b67718713dd9a28eab2b2471ff6369f75..aab06110178361694b98fc9c0aa3152147b383d7 100644 (file)
@@ -78,8 +78,8 @@ class Cubedesigners_View_Helper_CasestudiesList extends CubeIT_View_Helper_Abstr
                                        if (is_array($r->technologies) && is_array($currentStudie->technologies)) {
                                                if (count($r->technologies) >= 1 && count($currentStudie->technologies) >= 1) {
 
-                                                       for ($i = 0; $i < count($studieSecondaires); $i++) {
-                                                               if (in_array($currentStudie->technologies[$i], $r->technologies)) {
+                                                       foreach ($currentStudie->technologies as $t) {
+                                                               if (in_array([$i], $r->technologies)) {
                                                                        $r->point += 15;
                                                                }
                                                        }
@@ -144,7 +144,7 @@ class Cubedesigners_View_Helper_CasestudiesList extends CubeIT_View_Helper_Abstr
                  } */
 
                $image = $this->view->imageProcess($s->visuel, $s->titre, 300, 225);
-               $url = CubeIT_Navigation_Page::generateAutoUri($s, $this->_datas['seourl_stu']);
+               $url = Cubedesigners_Util::generateAutoUri($s, $this->_datas['seourl_stu']);
 
                $c = $image;
                $c.= '<h2>' . $s->titre . '</h2>';
index 43d1bdca47c2f10265224e58c8dd391758be5164..6185c3870fedb99d2ca3d3f3305b9ae06bc9d430 100644 (file)
@@ -16,7 +16,7 @@ class Cubedesigners_View_Helper_HomeSlideshow extends CubeIT_View_Helper_Abstrac
 
                foreach ($slides as $id => $slide) {
                        if (null !== $slide['mask']) {
-                               $image = $this->view->imageMasked($slide['image'], $slide['mask'], $slide['legend']);
+                               $image = $this->view->imageMasked($slide['image'], $slide['mask'], $slide['legende']);
                                $d = CubeIT_View_Helper_Image::$lastDimensions;
                        } else {
                                $image = $this->view->imageCms($slide['image'], $slide['legend']);
index a438b42bebcb9fc6c555d281a7438a31554d07b2..0f7f4cc2d06ec9e332501224ffc9346cab3d2a71 100644 (file)
@@ -4,13 +4,42 @@ class Cubedesigners_View_Helper_Realisation extends CubeIT_View_Helper_Abstract
 
        public function realisation($r) {
 
-               $res = '<div class="content">';
+               $this->addScriptAndStyle('realisation');
+               $r = CubeIT_Util_Cms::unserialize($r);
+
+               $res = '';
+               $res.='<article class="realisation">';
+               $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));
+
+               $slides = array();
+               foreach ($r->visuel_detail as $s) {
+                       if (CubeIT_Files::getExtension($s) == 'flv') {
+                               $slides[] = $this->view->videoCubetube($s, 780, 16 / 9, array('background' => 'ffffff'));
+                       } else {
+                               $slides[] = $s;
+                       }
+               }
+
+               $res.=$this->imageSlideshowScroll($slides, 439, array(), array('shortcuts' => false));
+               $res.='<div class="content">';
+               $res.=$this->_button($r->url);
+               $res.=$this->markupDotclear($r->description);
+               $res.='</div>';
+               $res.='</article>';
 
                return $res;
        }
 
+       protected function _button($b) {
+               $b = CubeIT_Util_Array::asArray($b);
+
+               if ($b['label'] == '') {
+                       $b['label'] = __('Voir le site');
+               }
+               return $this->linkCMS($b, array('class' => 'but'));
+       }
+
 }
index 471e198e0db355afac20666b56906a359760b05d..113e1a1c86abf2b522d58fa7518c0f9e262ee08e 100644 (file)
@@ -34,7 +34,7 @@ class Cubedesigners_View_Helper_RealisationsList extends CubeIT_View_Helper_Abst
                        $rea.='<h2>' . $r->titre . '</h2>';
                        $rea.='<h3>' . Cubedesigners_Util::getCategoryById($r->categories) . ' // ' . $this->dateTime($r->date, Zend_Date::YEAR) . '</h3>';
 
-                       $url = CubeIT_Navigation_Page::generateAutoUri($r, $datas['seourl_rea']);
+                       $url = Cubedesigners_Util::generateAutoUri($r, $datas['seourl_rea']);
 
                        $res .= $this->link($rea, $url, array('data-id' => $r->id, 'data-cat' => $r->categories));
                }
index 8c9d0e7bf38c5b8e11d50036526650f95f0771c5..753fd69de1c1dcf11e3bb150d4ce3827977d1557 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
-$this->headTitle($this->realisation->titre . ' // ' . $this->currentPage->getParent()->getTitle() . ' // Cubedesigners', 'SET');
+$r = CubeIT_Util_Cms::unserialize($this->realisation);
+$this->headTitle($r->titre . ' - ' . $r->legende . ' // ' . $this->currentPage->getParent()->getTitle(), 'SET');
 $this->headSeo()->setDescription($this->realisation->description);
 $this->headOpenGraph()->setDescription($this->realisation->description);
 
index 57c0b440550300708d8fd8793c03f4278d09b11b..75ad2d1fc1a32742e668d64b2f22b327e9504af5 100644 (file)
@@ -1,11 +1,11 @@
 <?php
 $this->headTitle($this->titre . ' // ' . $this->currentPage->getParent()->getTitle() . ' // Cubedesigners', 'SET');
 $this->headSeo()->setDescription($this->studie->legende);
-$this->headOpenGraph()->setDescription($this->realisation->legende);
+$this->headOpenGraph()->setDescription($this->studie->legende);
 $this->headScript()->addScriptAndStyle('casestudies_detail');
 ?>
 
-<div class="casestudies-detail-title"><?php echo $this->markupDotclear($this->titre); ?></div>
+
 
 <?php
 echo $this->CasestudiesDetail($this->studie);
index 7785807c4e6853500e1d91a695f3bb25fbe40f5e..a1cf3b276d14920559083db10900468e150283d1 100644 (file)
@@ -3,11 +3,12 @@ registerLoader(loadCarrousel);
 function loadCarrousel() {
        $(window).on('cubeitresize', function () {
                var s = $(".slideshow,.slideshowcontinuous");
-               fb(s);
                var ww = $(window).width();
                var m = (ww - 1600) / 2;
                $(s).find(".imgholder").css({marginLeft: m});
                $(s).find(".arrows").css({left: 960 + ((ww - 960) / 2) - 77 - 10});
        });
+
+
 }
 
index 4d1dedaee98ec87809d1f175d10d8d7a837e70e3..4eec6d0c97a87073a6e4fe701d760690fe37baba 100644 (file)
                h2 {
                        font-size: 32px;
                        line-height: 35px;
+                       height:38px;
                        color:#1b1b1b;
                }
                h3 {
                        font-size: 14px;
                        line-height: 16px;
+                       height:18px;
                        color:#545454;
-                       margin-bottom: 20px;
+                       margin:-3px 0 20px;
+
                }
                &.last{
                        margin-right: 0;
index a56006db339d226f850d1581a9d0717b3d892714..450032064cb3eb8e2509539ef936421bc065c853 100644 (file)
-/* 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;
+.case{
+       margin:50px 0 0 0;
+       h1{
+               font-size: 32px;
+       }
+       h2{
+               margin:0 0 15px 0;
+       }
+
+       /* Case studies detail visuel */
+       #casestudies-detail-visuel {
+               padding-bottom:50px;
+
+               a {
+                       background-color: #3885e0;
+                       border-radius: 2px;
+                       padding: 5px 20px;
+                       color:#fff;
                }
-    }
-
-    .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) {
-
-}
+
+               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;
+               }
+       }
+}
\ No newline at end of file
index bf8d6e9526c412ba9137b8e0b1edb118a11b92db..ae70280ed6f18a232f89fc8f9701fc9a2a521ebe 100644 (file)
@@ -12,7 +12,6 @@ body {
     font-weight:300;
     color:#1b1b1b;
        opacity:0;
-       letter-spacing: -0.01em;
        transition:opacity 0.25s linear;
 }
 
@@ -84,7 +83,7 @@ a.but {
        h1 {
                text-align: left;
                font-size: 56px;
-               line-height: 61px;
+               line-height: 81px;
        }
        h2 {
                text-align: left;
@@ -97,4 +96,7 @@ a.but {
        h3,h4{
                font-weight: 500;
        }
+       p{
+               line-height: 1.56em;
+       }
 }
\ No newline at end of file
diff --git a/less/mixins.less b/less/mixins.less
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/less/realisation.less b/less/realisation.less
new file mode 100644 (file)
index 0000000..51ac7d7
--- /dev/null
@@ -0,0 +1,20 @@
+.realisation{
+       margin:50px 0 0 0;
+       h1{
+               font-size: 32px;
+       }
+       h2{
+               margin:0 0 15px 0;
+       }
+
+       .but{
+               margin:20px 0;
+               float:right;
+               background-color: #3885e0 !important;
+       }
+
+       .dotclear{
+               clear: both;
+               margin:30px 0 30px 0;
+       }
+}
\ No newline at end of file
index ee4abf12082d16ee7c9c9d22f56a61a01bf701fa..042e57c2e333184a84d94ef110de1a1790116863 100644 (file)
        }
 }
 
+.slideshowscroll{
+       .slideshowmixin();
+
+       .slidescont{
+               overflow:hidden;
+               max-width: 100%;
+               -webkit-overflow-scrolling: touch;
+
+       }
+       .slidesfree{
+               width:100000px;
+       }
+       .slides{
+               display: inline-block;
+               overflow: visible;
+               max-width: none;
+               white-space:nowrap;
+               position:relative;
+
+
+               .slide{
+                       position:static;
+                       display:inline-block !important;
+                       margin:0 0 0 20px;
+                       height:439px !important;
+                       width:auto !important;
+               }
+       }
+       height:439px;
+}
+
 .slideshowcontinuous{
 
        .slideshowmixin();