From: stephen@cubedesigners.com Date: Wed, 2 Sep 2015 15:15:49 +0000 (+0000) Subject: Allow related case studies to be picked manually for expertise and client pages. X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=143b7162d5c7d25e870611609a6d965d153dc480;p=cubedesigners-v7.git Allow related case studies to be picked manually for expertise and client pages. Add animated down arrow to home slideshow. Multiple styling fixes, including a hack-fix for bad Klavika font rendering on Windows + Chrome (see common.less). --- diff --git a/framework/application/forms/CMS/Expertise.php b/framework/application/forms/CMS/Expertise.php index a8e5b19..c625b1e 100644 --- a/framework/application/forms/CMS/Expertise.php +++ b/framework/application/forms/CMS/Expertise.php @@ -4,6 +4,10 @@ class Cubedesigners_Form_CMS_Expertise extends Cubedesigners_Form_CMS_Expertises public function init() { parent::init(); + + $related_casestudies = new Cubedesigners_Form_CMS_Sub_RelatedCaseStudies(); + $related_casestudies->setLegend('Related Case Studies'); + $this->addSubForm($related_casestudies, 'related_casestudies'); } } diff --git a/framework/application/forms/CMS/Sub/ExpertiseCategories.php b/framework/application/forms/CMS/Sub/ExpertiseCategories.php deleted file mode 100644 index 183358f..0000000 --- a/framework/application/forms/CMS/Sub/ExpertiseCategories.php +++ /dev/null @@ -1,16 +0,0 @@ -setLabel('Case Studies sous-titre'); - $this->addElementLocalized($titre); - - $categories = new Cubedesigners_Form_Element_CategoriesCheckboxes('categories'); - $categories->setLabel('Categories'); - $this->addElement($categories); - } -} \ No newline at end of file diff --git a/framework/application/forms/CMS/Sub/Home/Expertises.php b/framework/application/forms/CMS/Sub/Home/Expertises.php index 4fb7b40..fea8749 100644 --- a/framework/application/forms/CMS/Sub/Home/Expertises.php +++ b/framework/application/forms/CMS/Sub/Home/Expertises.php @@ -17,10 +17,6 @@ class Cubedesigners_Form_CMS_Sub_Home_Expertises extends CubeIT_Form_SubForm { $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'); } } diff --git a/framework/application/forms/CMS/Sub/RelatedCaseStudies.php b/framework/application/forms/CMS/Sub/RelatedCaseStudies.php new file mode 100644 index 0000000..f34132a --- /dev/null +++ b/framework/application/forms/CMS/Sub/RelatedCaseStudies.php @@ -0,0 +1,16 @@ +setLabel('Related Case Studies sous-titre'); + $this->addElementLocalized($titre); + + $casestudies = new Cubedesigners_Form_Element_CaseStudiesCheckboxes('casestudies'); + $casestudies->setLabel('Case Studies'); + $this->addElement($casestudies); + } +} \ No newline at end of file diff --git a/framework/application/forms/Element/CaseStudiesCheckboxes.php b/framework/application/forms/Element/CaseStudiesCheckboxes.php new file mode 100644 index 0000000..d8cf002 --- /dev/null +++ b/framework/application/forms/Element/CaseStudiesCheckboxes.php @@ -0,0 +1,9 @@ +setBaseForm('Cubedesigners_Form_CMS_Sub_Casestudies_Studies'); + } + +} \ No newline at end of file diff --git a/framework/application/views/helpers/CasestudiesList.php b/framework/application/views/helpers/CasestudiesList.php index 35a93c4..24bb5fc 100644 --- a/framework/application/views/helpers/CasestudiesList.php +++ b/framework/application/views/helpers/CasestudiesList.php @@ -4,7 +4,7 @@ class Cubedesigners_View_Helper_CasestudiesList extends CubeIT_View_Helper_Abstr protected $_datas; - public function CasestudiesList($datas, $currentStudie = null, $categories = null, $limit = null) { + public function CasestudiesList($datas, $currentStudie = null, $categories = null, $limit = null, $IDs = null) { $this->addScriptAndStyle('casestudies'); $this->_datas = $datas; @@ -30,6 +30,11 @@ class Cubedesigners_View_Helper_CasestudiesList extends CubeIT_View_Helper_Abstr $s->where('categories IN (?)', $categories); } + // Fetch specific case study IDs + if(is_array($IDs)) { + $s->where('id IN (?)', $IDs); + } + if($limit) { $s->limit($limit); } diff --git a/framework/application/views/scripts/studies/index.phtml b/framework/application/views/scripts/studies/index.phtml index 7af939a..9d00408 100644 --- a/framework/application/views/scripts/studies/index.phtml +++ b/framework/application/views/scripts/studies/index.phtml @@ -6,7 +6,7 @@ $this->headScript()->addScriptAndStyle('casestudies_detail'); echo $this->CasestudiesDetail($this->studie); ?> -