$agence->setLabel("L'agence");
$this->addSubForm($agence, 'agence');
+ $case_studies = new Cubedesigners_Form_CMS_Sub_Home_CaseStudies();
+ $case_studies->setLabel("Case Studies");
+ $this->addSubForm($case_studies, 'case_studies');
+
+ $clients = new Cubedesigners_Form_CMS_Sub_Home_Clients();
+ $clients->setLabel("Clients");
+ $this->addSubForm($clients, 'clients');
+
$expertises = new Cubedesigners_Form_CMS_Sub_Home_Expertises();
$expertises->setLabel(' Expertises');
$this->addSubForm($expertises, 'expertises');
}
-}
-
-?>
\ No newline at end of file
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+class Cubedesigners_Form_CMS_Sub_ExpertiseCategories extends CubeIT_Form_SubForm
+{
+ public function init() {
+ parent::init();
+
+ $titre = new Zend_Form_Element_Text('title');
+ $titre->setLabel('Expertise Titre');
+ $this->addElementLocalized($titre);
+
+ $categories = new Cubedesigners_Form_Element_CategoriesCheckboxes('categories');
+ $categories->setLabel('Categories');
+ $this->addElement($categories);
+ }
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+class Cubedesigners_Form_CMS_Sub_Home_CaseStudies extends CubeIT_Form_SubForm {
+
+ public function init() {
+ parent::init();
+
+ $titre = new Zend_Form_Element_Text('titre');
+ $titre->setLabel('Titre');
+ $this->addElement($titre);
+
+ $texte = new CubeIT_Form_Element_Markitup_Basic('texte');
+ $texte->setLabel('Texte');
+ $this->addElement($texte);
+
+ $display_count = new CubeIT_Form_Element_Number('display_count');
+ $display_count->setLabel('Number of Case Studies to display');
+ $this->addElement($display_count);
+
+ $lien = new CubeIT_Form_Element_Link();
+ $lien->urlEnabled(false)->fileEnabled(false);
+ $lien->setLegend('Bouton');
+ $this->addSubForm($lien, 'button');
+ }
+
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+class Cubedesigners_Form_CMS_Sub_Home_Clients extends CubeIT_Form_SubForm {
+
+ public function init() {
+ parent::init();
+
+ $titre = new Zend_Form_Element_Text('titre');
+ $titre->setLabel('Titre');
+ $this->addElement($titre);
+
+ $blocs = new Cubedesigners_Form_CMS_Sub_Home_Clients_Blocs('blocs');
+ $blocs->setLegend('Blocs');
+ $this->addSubForm($blocs, 'blocs');
+
+ $lien = new CubeIT_Form_Element_Link();
+ $lien->urlEnabled(false)->fileEnabled(false);
+ $lien->setLegend('Bouton');
+ $this->addSubForm($lien, 'button');
+ }
+
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+class Cubedesigners_Form_CMS_Sub_Home_Clients_Bloc extends CubeIT_Form_SubForm {
+
+ public function init() {
+ parent::init();
+
+ $titre = new Zend_Form_Element_Text('titre');
+ $titre->setLabel('Titre du bloc');
+ $this->addElement($titre);
+
+ $texte = new CubeIT_Form_Element_Markitup_Basic('texte');
+ $texte->setLabel('Texte');
+ $this->addElement($texte);
+
+ $picto = new CubeIT_Form_Element_File_Image('picto');
+ $picto->setLabel('Pictogramme');
+ $picto->setMaxItems(1);
+ $this->addElement($picto);
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+
+class Cubedesigners_Form_CMS_Sub_Home_Clients_Blocs extends CubeIT_Form_Multi_SubForm {
+
+ public function init() {
+ parent::init();
+
+ $bloc = new Cubedesigners_Form_CMS_Sub_Home_Clients_Bloc();
+ $this->setBaseSubForm($bloc);
+ $this->setBaseLegend('Edition du bloc « $titre »');
+ $this->setNewLegend('Nouveau bloc');
+ }
+
+}
+
+?>
$lien->urlEnabled(false)->fileEnabled(false);
$lien->setLegend('Bouton');
$this->addSubForm($lien, 'button');
+
+ $related_categories = new Cubedesigners_Form_CMS_Sub_ExpertiseCategories();
+ $related_categories->setLegend('Related Categories (for Case Studies)');
+ $this->addSubForm($related_categories, 'related_categories');
}
}
->setEditTitle('Edition de la réalisation « $titre »')
->setModel('Cubedesigners_Model_Realisation')
->setTitleColumn("titre")
- ->setAdditionnalColumns(array('titre', 'agence', 'date', 'categories', 'online'))
+ ->setAdditionnalColumns(array('agence', 'date', 'categories', 'online'))
->setSearchColumns(array('titre', 'agence', 'date'));
}
$name->setLabel(__('Nom'));
$this->addElementLocalized($name, false);
+ $order = new Zend_Form_Element_Text('sort_order');
+ $order->setLabel('Sort Order');
+ $this->addElement($order);
+
$this->setListTitle(__('Categories'))
->setNewTitle(__('Créer une catégorie'))
->setEditTitle(sprintf(__("Edition de la catégorie « %s »"), '$name'))
->setTitleColumn('name')
+ ->setAdditionnalColumns(array('sort_order'))
->setModel("Cubedesigners_Model_Categorie");
}
--- /dev/null
+<?php\r
+\r
+class Cubedesigners_Form_Element_CategoriesCheckboxes extends CubeIT_Form_Element_MultiCheckboxList {\r
+\r
+ public function init() {\r
+ $this->setBaseForm('Cubedesigners_Form_Categories');\r
+ }\r
+\r
+}
\ No newline at end of file
class Cubedesigners_Model_Categorie extends CubeIT_Model_Data_Table {
protected static $_table = 'categories';
- protected $name;
+ protected $name;
+ protected $sort_order;
public static function getSchema($schema) {
$table = parent::getSchema($schema);
$table->addColumn('name', 'string', array('length' => 64));
+ $table->addColumn('sort_order', 'smallint', array('unsigned' => true));
}
}
$res.='<div class="content">';
$res.='<h1>' . $studie->titre . '</h1>';
$res.='<h2>' . $studie->description . '</h2>';
- $res.= $this->view->link(__('Fermer'), $this->currentPage->getParent()->getHref(), array('class' => 'close', 'id' => 'closeButton'));
$res.='</div>';
$res .= '<div class="casestudies-detail-visuel">';
if ($bloc->selectedtype == "video") {
$res .= '<div class="detail-video" style="' . $margin . '' . $zindex . '" >';
- $video = $this->view->videoWeb($bloc->video, 980);
+ $video = $this->view->videoWeb($bloc->video, '100%', 'auto', array(), array('class' => 'resize-ratio'));
if ($addVideoBackground) {
$background = $this->view->imageProcess()->imageProcessGetUrl($bloc->video_background, '', 1200, null);
return $res;
}
-}
-
-?>
+}
\ No newline at end of file
protected $_datas;
- public function CasestudiesList($datas, $currentStudie = null) {
+ public function CasestudiesList($datas, $currentStudie = null, $categories = null, $limit = null) {
+
$this->addScriptAndStyle('casestudies');
$this->_datas = $datas;
$listStudies = array();
$s = $db->select()->from('casestudies')
->order('annee DESC');
+ if(is_array($categories)) {
+ $s->where('categories IN (?)', $categories);
+ }
+
+ if($limit) {
+ $s->limit($limit);
+ }
+
if (!$acl) {
$s->where('online = ?', 1);
}
$addOffline = 'data-offline="1"';
} */
- $image = $this->view->imageProcess($s->visuel, $s->titre, 300, 225);
+ $image = $this->view->imageProcess($s->visuel, $s->titre, 318, 318);
$url = Cubedesigners_Util::generateAutoUri($s, $this->_datas['seourl_stu']);
$c = $image;
$c.= '<h2>' . $s->titre . '</h2>';
$c.='<h3>' . $s->description . '</h3>';
- return $this->link($c, $url, array('data-cat' => $s->categories));
+ return $this->link($c, $url, array('data-cat' => $s->categories)) . ' '; // Space needed between elements for justified alignment
}
}
$db = Zend_Db_Table::getDefaultAdapter();
$s = $db->select()->from('categories')
- ->order('id ASC');
+ ->order('sort_order ASC');
$q = $s->query();
class Cubedesigners_View_Helper_Realisation extends CubeIT_View_Helper_Abstract {
- public function realisation($r) {
+ public function realisation($realisation) {
$this->addScriptAndStyle('realisation');
- $r = CubeIT_Util_Cms::unserialize($r);
+ $r = CubeIT_Util_Cms::unserialize($realisation);
$res = '';
$res .= '<article class="realisation">';
- $res .= '<div class="content">';
- $res .= '<h1>' . $r->titre . '</h1>';
- $res .= '<h2>' . Cubedesigners_Util::getCategoryById($r->categories, $this->localeDefault()) . '</h2>';
+ $res .= '<div class="content close-holder">';
$res .= $this->view->link(__('Fermer'), $this->currentPage->getParent()->getHref(), array('class' => 'close', 'id' => 'closeButton'));
$res .= '</div>';
$res .= $this->imageSlideshowScroll($slides, 439, array(), array('shortcuts' => false));
$res .= '<div class="content">';
+ $res .= '<h1>' . $r->titre . '</h1>';
+ $res .= '<ul class="tags">';
+ $res .= '<li>' . $this->dateTime($realisation->date, Zend_Date::YEAR) . '</li>';
+ $res .= '<li>' . Cubedesigners_Util::getCategoryById($r->categories, $this->localeDefault()) . '</li>';
+ $res .= '</ul>';
- if (!empty($r->url->url)) {
- $res .= $this->_button($r->url);
- }
+ $res .= $this->markupDotclear($r->description);
- $res .= $this->markupDotclear($r->description);
- $res .= '</div>';
+ if (!empty($r->url->url)) {
+ $res .= $this->_button($r->url);
+ }
+
+ $res .= '</div>';
$res .= '</article>';
return $res;
$addOffline = 'data-offline="1"';
}
- $visuel = $this->view->imageProcess($r->visuel_detail, '', null, 440);
-
- $rea = $this->view->imageProcess($r->visuel, $r->titre, 170, 127);
- $rea .= '<h2>' . $r->titre . '</h2>';
- $rea .= '<h3>' . Cubedesigners_Util::getCategoryById($r->categories, $this->localeDefault()) . ' / ' . $this->dateTime($r->date, Zend_Date::YEAR) . '</h3>';
+ //$visuel = $this->view->imageProcess($r->visuel_detail, '', null, 440);
+
+ $rea = $this->view->imageProcess($r->visuel, $r->titre, 236, 236);
+// fb($r, 'r');
+ $rea.= '<div class="details-positioner">';
+ $rea.= '<div class="details-holder">';
+ $rea.= '<div class="details">';
+ $rea.='<h2>' . $r->titre . '</h2>';
+ // replace last occurrence of space with nbsp; to prevent orphans (http://stackoverflow.com/a/18113904)
+ $rea.='<h3>' . strrev(implode(strrev(' '), explode(' ', strrev($r->legende), 2))) . '</h3>';
+ $rea.= '</div>'; // .details (display: table-cell)
+ $rea.= '</div>'; // .details-holder (display: table)
+ $rea.= '</div>'; // .details-positioner (display: block; position: absolute)
$url = Cubedesigners_Util::generateAutoUri($r, $datas['seourl_rea'], $this->localeDefault());
echo $this->CasestudiesDetail($this->studie);
?>
-
-<div class="title content"><?php echo $this->markupDotclear($this->casestudies_titre); ?></div>
-
<div class="casestudies-list related content">
- <?php echo $this->CasestudiesList($this->datas, $this->studie); ?>
+ <div class="title">
+ <?php echo $this->markupDotclear($this->casestudies_titre); ?>
+ </div>
+
+ <?php echo $this->CasestudiesList($this->datas, $this->studie); ?>
</div>
\ No newline at end of file
echo $this->twocols();
echo $this->htmlElement($this->citation, 'blockquote', array('class' => 'citation content'));
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 '<div class="casestudies-list related content">';
+echo '<div class="title">';
+echo '<h1>'. __('Case Studies') .'</h1>';
+echo '<h2>'. sprintf(__('Projets de %s'), $expertise['related_categories']['title']) .'</h2>'; // ToDo: improve the way this is done
+echo '</div>'; // .title
+
+$limit_results = 3; // How many case studies to return
+echo $this->CasestudiesList($casestudy_page_data, null, $expertise['related_categories']['categories'], $limit_results);
+echo '</div>'; // .casestudies-list
$this->headScript()->addScriptAndStyle('home');
$this->beforeMain = $this->homeSlideshow($this->slideshow);
echo $this->liste($this->agence, false, array('id' => 'agency', 'class' => 'white'));
+
+//-- Case Studies --//
+$case_studies_page_ID = 4;
+$case_studies_data = Bootstrap::getInstance()->getCMSDatasOfPage($case_studies_page_ID);
+
+echo '<section id="casestudies">';
+echo '<div class="bloc-holder content">';
+echo '<h2 class="title">'. $this->case_studies['titre'] .'</h2>';
+echo $this->markupDotclear($this->case_studies['texte']);
+
+echo '<div class="casestudies-list jgroup">';
+echo $this->CasestudiesList($case_studies_data, null, null, $this->case_studies['display_count']);
+echo '</div>';
+
+if ($this->case_studies['button']['label']) {
+ echo $this->linkCMS($this->case_studies['button'], array('class' => 'but'));
+}
+echo '</div>';
+echo '</section>';
+
+echo $this->liste($this->clients, false, array('id' => 'clients', 'class' => 'white'));
echo $this->liste($this->expertises, false, array('id' => 'expertiseshome', 'class' => 'grey'));
<div id="realisations-tagslist">
<?php
- echo $this->CategoriesList("realisations", 'realisations-list', 170, 32);
+ echo $this->CategoriesList("realisations", 'realisations-list', 236, 12);
?>
</div>
}\r
}\r
}\r
+}\r
+\r
+\r
+// Justified group (evenly space inline-block elements in a grid without specifying margins)\r
+// From: https://gist.github.com/interactivellama/5699885\r
+// Note: elements *must* have whitespace between them or this won't work. No minified HTML.\r
+.jgroup {\r
+ text-align: justify;\r
+ font-size: 0.1px;\r
+\r
+ &:after{\r
+ content: '';\r
+ display: inline-block;\r
+ width: 100%;\r
+ }\r
}
\ No newline at end of file
background: #f6ae01;
padding: 3px 0 3px;
+ position: absolute; // Needed to make it sit above header. Could also be 'fixed'...
+ width: 100%;
+ z-index: 10;
.bar {
color: #fff;
/* Agence equipe */
.agency-persons {
- background-color: @yellow;
- color: #fff;
+ background-color: #fff;
+ color: #222428;
.bloc-holder {
padding-top: 50px;
padding-bottom: 25px;
}
.detail-video {
- padding: 0px 0 50px 0;
+ padding: 0 34px 50px 34px;
+ margin: 0 auto;
position: relative;
z-index: 5;
text-align: center;
/* vertical-align: middle;
display: table-cell; */
+ max-width: 1048px; /* 980px + left padding + right padding */
+ min-width: 530px;
}
.detail-visuel {
}
h1, h2 {
- font-weight: 500;
+ font-weight: 400;
text-transform: uppercase;
}
max-height: none;
}
-@media screen and (max-width: 890px) {
+// Breakpoint for mobile menu
+@media screen and (max-width: 1020px) {
.logo {
top: 30px;
}
}
}
+}
+
+#casestudies {
+ background-color: #222428;
+ color: #fff;
+ font-size: 22px;
+ padding: 100px 0 77px 0;
+
+ .title {
+ font-size: 56px;
+ padding-top: 0;
+ }
+
+ .casestudies-list {
+ h2, h3 {
+ color: #fff;
+ font-weight: 300;
+ }
+ h2 {
+ font-size: 32px;
+ text-transform: none;
+ @media screen and (max-width: 1000px) {
+ font-size: 24px;
+ }
+ }
+ h3 {
+ font-size: 16px;
+ }
+
+ a {
+ width: 32.5%;
+ max-width: 318px;
+ height: auto;
+
+ @media screen and (max-width: 768px) { // Switch to 2 columns
+ width: 49%;
+ }
+
+ }
+ }
+
}
\ No newline at end of file
@import "00-constants";
section.list {
+ padding-top: 100px;
+ padding-bottom: 100px;
- &.white {
- background-color: #fff;
- color: #222428;
- a {
- color: #222428;
- text-decoration: underline;
- }
- }
+ &.white {
+ background-color: #fff;
+ color: #222428;
+ a {
+ color: #222428;
+ text-decoration: underline;
+ }
+ }
- &.grey {
- background-color: #eeeff3;
- color: #222428;
- a {
- color: #222428;
- text-decoration: underline;
- }
- }
+ &.grey {
+ background-color: #eeeff3;
+ color: #222428;
+ a {
+ color: #222428;
+ text-decoration: underline;
+ }
+ }
- &#expertisehome {
- background-color: #fff;
- color: #1b1b1b;
- }
+ &#expertisehome {
+ background-color: #fff;
+ color: #1b1b1b;
+ }
+}
- .bloc-holder {
- padding-top: 50px;
- padding-bottom: 50px;
- overflow: hidden;
- h2 {
- font-size: 56px;
- }
- h3 {
- font-size: 32px;
- padding: 0 0 20px 0;
- }
- a.but {
- background-color: @yellow;
- }
+.bloc-holder {
+ overflow: hidden;
+ h2 {
+ font-size: 56px;
+ }
+ h3 {
+ font-size: 32px;
+ padding: 0 0 20px 0;
+ }
+ a.but {
+ background-color: @yellow;
+ }
- .blocs {
- padding: 40px 0;
- overflow: hidden;
+ .blocs {
+ padding: 40px 0;
+ overflow: hidden;
- &.two {
- margin-bottom: -50px; // Offset the 50px margins on the .sousbloc
+ &.two {
+ margin-bottom: -50px; // Offset the 50px margins on the .sousbloc
- .sousbloc {
- white-space: normal;
- width: 50%;
- padding-right: 20px;
- margin-bottom: 50px;
+ .sousbloc {
+ white-space: normal;
+ width: 50%;
+ padding-right: 20px;
+ margin-bottom: 50px;
- &:nth-of-type(2n) {
- padding-right: 0;
- padding-left: 20px;
- }
+ &:nth-of-type(2n) {
+ padding-right: 0;
+ padding-left: 20px;
+ }
- @media screen and (max-width: 990px) {
- display: block;
- width: 100%;
+ @media screen and (max-width: 990px) {
+ display: block;
+ width: 100%;
- &:nth-of-type(2n) {
- padding: 0;
- }
- }
- }
- }
+ &:nth-of-type(2n) {
+ padding: 0;
+ }
+ }
+ }
+ }
- .sousbloc {
- display: inline-block;
- vertical-align: top;
- margin: 0 0 50px 0;
- &:extend(.media);
+ .sousbloc {
+ display: inline-block;
+ vertical-align: top;
+ margin: 0 0 50px 0;
+ &:extend(.media);
- .text {
- &:extend(.media--body);
- }
- img {
- &:extend(.media--item);
- }
- }
- }
+ .text {
+ &:extend(.media--body);
+ }
+ img {
+ &:extend(.media--item);
+ }
+ }
+ }
- }
}
\ No newline at end of file
&:hover, &.active {
cursor: pointer;
color: #fff;
- background-color: #84ae1e;
+ background-color: #f6ae01;
}
}
}
\ No newline at end of file