From: vincent@cubedesigners.com Date: Tue, 18 Nov 2014 16:59:17 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1e116d84b9c19e74b8930009da09beb834545ef4;p=cubedesigners-v7.git --- diff --git a/framework/application/forms/CMS/Sub/Followus/SocialNetwork.php b/framework/application/forms/CMS/Sub/Followus/SocialNetwork.php index cbcdd6a..7520fb4 100644 --- a/framework/application/forms/CMS/Sub/Followus/SocialNetwork.php +++ b/framework/application/forms/CMS/Sub/Followus/SocialNetwork.php @@ -24,5 +24,3 @@ class Cubedesigners_Form_CMS_Sub_Followus_SocialNetwork extends CubeIT_Form_SubF } } - -?> diff --git a/framework/application/views/helpers/CasestudiesList.php b/framework/application/views/helpers/CasestudiesList.php index e2f978a..65a8d8f 100644 --- a/framework/application/views/helpers/CasestudiesList.php +++ b/framework/application/views/helpers/CasestudiesList.php @@ -1,219 +1,151 @@ -categories; - $studieSecondaires = $currentStudie->tags_secondaires; - $studieTechnologies = $currentStudie->technologies; - $studieDomaines = $currentStudie->domaines; - $studieDate = $currentStudie->annee; - } - - $acl = Bootstrap::getInstance()->isAllowed("edition"); - - $db = Zend_Db_Table::getDefaultAdapter(); - $s = $db->select()->from('casestudies') - ->order('id ASC'); - - if (!$acl) { - $s->where('online = ?', 1); - } - - /* if ($currentStudie != null) { - - $s->where('categories = ?', $studieCategorie); - } */ - - $q = $s->query(); - - $count = 1; - - $res = ''; - - while ($r = $q->fetch()) { - - if ($r->id != $currentStudie->id) { - $r = CubeIT_Util_Cms::unserialize($r); - - //fb($r); - - $r->point = 0; - - $addSpacer = false; - - if ($count == 3) { - $count = 1; - $addClass = ''; - } else { - $addClass = ' blocmargin'; - $count++; - } - - $addOffline = ''; - if ($acl && $r->online == 0) { - $addOffline = 'data-offline="1"'; - } - - if ($currentStudie != null) { - if ($r->propulse == 1) - $r->point += 10000; - - 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)) - $r->point += 100; - } - } - } - - 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)) - $r->point += 15; - } - } - } - - if ($r->domaines != '') { - if ($r->domaines == $currentStudie->domaines) - $r->point += 10; - } - - if ($r->annee != '') { - if ($r->annee == $currentStudie->annee) - $r->point += 5; - } - } - - - /* if ($r->propulse == 1) { - array_push($listStudiesPropulsed, $r); - } else { */ - if (count($listStudies) < 3) { - array_push($listStudies, $r); - } else { - if ($r->point > $listStudies[0]->point) { - $listStudies[2] = $listStudies[1]; - $listStudies[1] = $listStudies[0]; - $listStudies[0] = $r; - } else if ($r->point > $listStudies[1]->point) { - $listStudies[2] = $listStudies[1]; - $listStudies[1] = $r; - } else if ($r->point > $listStudies[2]->point) { - $listStudies[2] = $r; - } else { - - } - } - //} - - - if ($currentStudie == null) { - $image = $this->view->imageProcess($r->visuel, $r->titre, 300, 225); - $url = CubeIT_Navigation_Page::generateAutoUri($r, $datas['seourl_stu']); - $res .= ''; - $res .= '
'; - $res .= '
' . $image . '
'; - $res .= '
' . $r->titre . '
'; - $res .= '
' . $r->description . '
'; - $res .= '
'; - $res .= '
'; - } - } - } - - if ($currentStudie != null) { - - $nbStudies = 0; - $count = 1; - - $listStudies = array_reverse($listStudies); - - /* if (count($listStudiesPropulsed) > 0) { - for ($k = 0; $k < count($listStudiesPropulsed); $k++) { - - $addSpacer = false; - - if ($count == 3) { - $count = 1; - $addClass = ''; - } else { - $addClass = ' blocmargin'; - $count++; - } - - $addOffline = ''; - if ($acl && $listStudiesPropulsed[$k]->online == 0) { - $addOffline = 'data-offline="1"'; - } - - $image = $this->view->imageProcess($listStudiesPropulsed[$k]->visuel, $listStudiesPropulsed[$k]->titre, 300, 225); - $url = CubeIT_Navigation_Page::generateAutoUri($listStudiesPropulsed[$k], $datas['seourl_stu']); - $res .= ''; - $res .= '
'; - $res .= '
' . $image . '
'; - $res .= '
' . $listStudiesPropulsed[$k]->titre . '
'; - $res .= '
' . $listStudiesPropulsed[$k]->description . '
'; - $res .= '
'; - $res .= '
'; - - $nbStudies++; - } - } */ - - - for ($j = 0; $j < count($listStudies); $j++) { - - if ($nbStudies < 3) { - $addSpacer = false; - - if ($count == 3) { - $count = 1; - $addClass = ''; - } else { - $addClass = ' blocmargin'; - $count++; - } - - $addOffline = ''; - if ($acl && $listStudies[$j]->online == 0) { - $addOffline = 'data-offline="1"'; - } - - $image = $this->view->imageProcess($listStudies[$j]->visuel, $listStudies[$j]->titre, 300, 225); - $url = CubeIT_Navigation_Page::generateAutoUri($listStudies[$j], $datas['seourl_stu']); - $res .= ''; - $res .= '
'; - $res .= '
' . $image . '
'; - $res .= '
' . $listStudies[$j]->titre . '
'; - $res .= '
' . $listStudies[$j]->description . '
'; - $res .= '
'; - $res .= '
'; - - $nbStudies++; - } - } - } - - //fb($listStudies); - - return $res; - } - -} - -?> +_datas = $datas; + $listStudies = array(); + $listStudiesPropulsed = array(); + + if ($currentStudie != null) { + // fb($currentStudie); + $studieCategorie = $currentStudie->categories; + $studieSecondaires = $currentStudie->tags_secondaires; + $studieTechnologies = $currentStudie->technologies; + $studieDomaines = $currentStudie->domaines; + $studieDate = $currentStudie->annee; + } + + $acl = Bootstrap::getInstance()->isAllowed("edition"); + + $db = Zend_Db_Table::getDefaultAdapter(); + $s = $db->select()->from('casestudies') + ->order('id ASC'); + + if (!$acl) { + $s->where('online = ?', 1); + } + $q = $s->query(); + + $count = 1; + + $res = ''; + + while ($r = $q->fetch()) { + + if ($r->id != $currentStudie->id) { + $r = CubeIT_Util_Cms::unserialize($r); + $r->point = 0; + + $addSpacer = false; + + if ($count == 3) { + $count = 1; + $addClass = ''; + } else { + $addClass = ' blocmargin'; + $count++; + } + + $addOffline = ''; + if ($acl && $r->online == 0) { + $addOffline = 'data-offline="1"'; + } + + if ($currentStudie != null) { + if ($r->propulse == 1) + $r->point += 10000; + + 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)) + $r->point += 100; + } + } + } + + 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)) + $r->point += 15; + } + } + } + + if ($r->domaines != '') { + if ($r->domaines == $currentStudie->domaines) + $r->point += 10; + } + + if ($r->annee != '') { + if ($r->annee == $currentStudie->annee) + $r->point += 5; + } + } + + if (count($listStudies) < 3) { + array_push($listStudies, $r); + } else { + if ($r->point > $listStudies[0]->point) { + $listStudies[2] = $listStudies[1]; + $listStudies[1] = $listStudies[0]; + $listStudies[0] = $r; + } else if ($r->point > $listStudies[1]->point) { + $listStudies[2] = $listStudies[1]; + $listStudies[1] = $r; + } else if ($r->point > $listStudies[2]->point) { + $listStudies[2] = $r; + } else { + + } + } + + + if ($currentStudie == null) { + $res.=$this->_case($r); + } + } + } + + if ($currentStudie != null) { + + $nbStudies = 0; + $count = 1; + + $listStudies = array_reverse($listStudies); + + + foreach ($listStudies as $s) { + $res.=$this->_case($s); + } + } + return $res; + } + + protected function _case($s) { + $addOffline = ''; + 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']); + + $c = $image; + $c.= '

' . $s->titre . '

'; + $c.='

' . $s->description . '

'; + + return $this->link($c, $url, array('data-cat' => $s->categories)); + } + +} diff --git a/framework/application/views/helpers/CategoriesList.php b/framework/application/views/helpers/CategoriesList.php index 620e6c6..664ec92 100644 --- a/framework/application/views/helpers/CategoriesList.php +++ b/framework/application/views/helpers/CategoriesList.php @@ -43,5 +43,3 @@ class Cubedesigners_View_Helper_CategoriesList extends Zend_View_Helper_Abstract } } - -?> diff --git a/less/casestudies.less b/less/casestudies.less index 5559e13..89b654d 100644 --- a/less/casestudies.less +++ b/less/casestudies.less @@ -5,34 +5,39 @@ padding: 0 0 50px 0; overflow: hidden; - .bloc { + a { width:300px; - float:left; - .project-photo { + display:inline-block; + margin:0 40px 0 0; + img { width:300px; height:225px; + display: block; background-color: #ccc; margin:0 0 10px 0; } - .project-title { + h2,h3{ + white-space: nowrap; + overflow: hidden; + max-width: 300px; + text-overflow: ellipsis; + } + h2 { font-size: 32px; line-height: 35px; color:#1b1b1b; } - .project-description { + h3 { font-size: 14px; line-height: 16px; color:#545454; margin-bottom: 20px; } - - } - - a,a:hover { - color:#000; + &:nth-child(3n){ + margin-right: 0; + } } - .blocmargin { margin-right:40px; }