*/
public function getCMSTemplates() {
$templates['texte'] = 'Texte';
- $templates['fonctionnalites'] = 'Fonctionnalites';
+ $templates['fonctionnalites'] = 'Fonctionnalités générales';
+ $templates['fonctionnalitessub'] = 'Détail fonctionnalité';
$templates['exemples'] = 'Exemples';
$templates['exemplessub'] = 'Exemples (niveau 2)';
$templates['contact'] = 'Contact';
--- /dev/null
+<?php\r
+\r
+class Fluidbook_Form_CMS_Fonctionnalitessub extends Fluidbook_Form_CMS_Base {\r
+\r
+\r
+ public function init() {\r
+ parent::init();\r
+\r
+ $titre = new CubeIT_Form_Element_Textarea('ex_title');\r
+ $titre->setLabel('Titre du bloc examples');\r
+ $titre->setAttrib('rows', 2);\r
+ $this->addElement($titre);\r
+\r
+ $details = new Fluidbook_Form_CMS_Sub_Features_FeatureDetails();\r
+ $details->setLabel('Détails');\r
+ $this->addSubForm($details, 'details');\r
+\r
+ $logos = new CubeIT_Form_Element_File_Image('features_logos');\r
+ $logos->setLabel('Logos');\r
+ $this->addElement($logos);\r
+\r
+ $category = new Fluidbook_Form_CMS_Sub_Exemples_CategorySelect('ex_category');\r
+ $category->setLabel('Catégorie de références');\r
+ $this->addElement($category);\r
+\r
+ $elements = new CubeIT_Form_Element_Int('ex_count');\r
+ $elements->setLabel('Nombre de références à afficher (multiple de 5)');\r
+ $elements->setValue(10);\r
+ $this->addElement($elements);\r
+\r
+ $exemples = new Fluidbook_Form_CMS_Element_Exemples('ex_exemples');\r
+ $exemples->setLabel('Gestion des exemples');\r
+ $this->addElement($exemples);\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+\r
+class Fluidbook_Form_CMS_Sub_Features_FeatureDetail extends CubeIT_Form_SubForm {\r
+ public function init() {\r
+ parent::init();\r
+ $title = new CubeIT_Form_Element_Text('title');\r
+ $title->setLabel('Titre');\r
+ $this->addElement($title);\r
+\r
+ $text = new CubeIT_Form_Element_Markitup_Essential('text');\r
+ $text->setLabel('Texte');\r
+ $this->addElement($text);\r
+\r
+ $image = new CubeIT_Form_Element_File_Image('image');\r
+ $image->setLabel('Image');\r
+ $image->setMaxItems(1);\r
+ $this->addElement($image);\r
+\r
+\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+\r
+class Fluidbook_Form_CMS_Sub_Features_FeatureDetails extends CubeIT_Form_Multi_SubForm {\r
+ public function init() {\r
+ parent::init();\r
+ $this->setBaseSubForm(new Fluidbook_Form_CMS_Sub_Features_FeatureDetail());\r
+ $this->setNewLegend('Nouveau détail');\r
+ $this->setBaseLegend('Editer « $title »');\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+class Fluidbook_View_Helper_FeatureDetails extends CubeIT_View_Helper_Abstract {\r
+ /**\r
+ * @return string\r
+ */\r
+ public function featureDetails($details) {\r
+ $res = '';\r
+ $i = 0;\r
+ foreach ($details as $detail) {\r
+ $res .= $this->_detail($detail, $i % 2 == 1);\r
+ $i++;\r
+ }\r
+\r
+ return $this->htmlElement($res, 'section', ['id' => 'featureDetails', 'class' => 'content-wrapper grid wrap']);\r
+ }\r
+\r
+ protected function _detail($d, $imageRight) {\r
+ $c = $this->htmlElement($d['title'], 'h3');\r
+ $c .= $this->markupDotclear($d['text']);\r
+ $c = $this->htmlElement($c, 'div', ['class' => 'content']);\r
+ $image = $this->imageProcess($d['image'], $d['title'], 755, 1000, [], 'R');\r
+\r
+ if ($imageRight) {\r
+ $res = $c . $image;\r
+ } else {\r
+ $res = $image . $c;\r
+ }\r
+\r
+\r
+ return $this->htmlElement($res, 'article', ['class' => $imageRight ? 'iright' : 'ileft']);\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+class Fluidbook_View_Helper_Logos extends CubeIT_View_Helper_Abstract {\r
+ /**\r
+ * @return string\r
+ */\r
+ public function logos($logos) {\r
+ $images = CubeIT_Util_Cms::extractFiles($logos);\r
+ if (!count($images)) {\r
+ return;\r
+ }\r
+\r
+ $this->addScriptAndStyle('106-logos');\r
+\r
+ $res = '';\r
+ foreach ($images as $image) {\r
+ $res .= $this->imageCms($image).' '; // Space needed for the justify\r
+ }\r
+\r
+ $res = $this->htmlElement($res, 'div', ['class' => 'c']);\r
+ return $this->htmlElement($res, 'section', ['class' => 'logos content-wrapper grid wrap']);\r
+ }\r
+}
\ No newline at end of file
<?php\r
echo $this->introBlock($this->intro, '');\r
-echo $this->exemples($this->category, $this->title,$this->count);\r
+echo $this->exemples($this->category, $this->title, $this->count);\r
echo $this->contactFooter();
\ No newline at end of file
--- /dev/null
+<?php\r
+$this->headScript()->addScriptAndStyle('420-features-details');\r
+\r
+$res = $this->introBlock($this->intro);\r
+$res .= $this->featureDetails($this->details);\r
+$res .= $this->logos($this->features_logos);\r
+$res .= $this->exemples($this->ex_category, $this->ex_title, $this->ex_count);\r
+$res .= $this->contactFooter();\r
+\r
+echo $res;
\ No newline at end of file
--- /dev/null
+@import "000-imports";\r
+\r
+.logos {\r
+ &.content-wrapper {\r
+ padding-top: 56px;\r
+ padding-bottom: 50px;\r
+ }\r
+ background-color: @color-light-grey;\r
+ .c {\r
+ display: inline-block;\r
+ width: 100%;\r
+ text-align: justify;\r
+ padding-left: 70px;\r
+ padding-right: 70px;\r
+ margin: 0 auto;\r
+ line-height: 0;\r
+\r
+ &:after {\r
+ content: "";\r
+ display: inline-block;\r
+ width: 100%;\r
+ height: 0;\r
+ }\r
+ img {\r
+ vertical-align: middle;\r
+ }\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+@import "000-imports";\r
+\r
+#featureDetails {\r
+ padding-top: 0;\r
+ color: @color-text;\r
+ article {\r
+ margin-top: 110px;\r
+ &:first-child {\r
+ margin-top: 0;\r
+ }\r
+\r
+ .content {\r
+ width: 755px;\r
+ padding: 60px 130px 0;\r
+ display: inline-block;\r
+ vertical-align: top;\r
+ font-size: 14px;\r
+\r
+ h3 {\r
+ font-family: @montserrat;\r
+ text-transform: uppercase;\r
+ font-weight: 500;\r
+ margin-bottom: 15px;\r
+ }\r
+ }\r
+ img {\r
+ display: inline-block;\r
+ width: 755px;\r
+ vertical-align: top;\r
+ }\r
+ }\r
+}
\ No newline at end of file