From a340dd5d1b55ca79bed07276940d5ec69b1a8418 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 2 Oct 2013 11:41:22 +0000 Subject: [PATCH] --- framework/application/forms/CMS/Faq.php | 8 +++++ .../forms/CMS/Sub/Faq/Temoignage.php | 16 ++++++++++ .../forms/CMS/Sub/Faq/Temoignages.php | 15 ++++++++++ .../application/views/helpers/Temoignages.php | 18 +++++++++++ .../views/scripts/templates/faq.phtml | 2 +- less/faq.less | 30 +++++++++++++++++++ 6 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 framework/application/forms/CMS/Sub/Faq/Temoignage.php create mode 100644 framework/application/forms/CMS/Sub/Faq/Temoignages.php create mode 100644 framework/application/views/helpers/Temoignages.php diff --git a/framework/application/forms/CMS/Faq.php b/framework/application/forms/CMS/Faq.php index 2ff03d7..d00c762 100644 --- a/framework/application/forms/CMS/Faq.php +++ b/framework/application/forms/CMS/Faq.php @@ -12,6 +12,14 @@ class CCGM_Form_CMS_Faq extends CCGM_Form_CMS_Default { $questions = new CCGM_Form_CMS_Sub_Faq_Questions(); $questions->setLegend('Question / Réponses'); $this->addSubForm($questions, 'questions'); + + $titret = new Zend_Form_Element_Text('titre_temoignages'); + $titret->setLabel('Titre de la rubrique "témoignages"'); + $this->addElement($titret); + + $temoignages = new CCGM_Form_CMS_Sub_Faq_Temoignages(); + $temoignages->setLegend('Témoignages'); + $this->addSubForm($temoignages, 'temoignages'); } } diff --git a/framework/application/forms/CMS/Sub/Faq/Temoignage.php b/framework/application/forms/CMS/Sub/Faq/Temoignage.php new file mode 100644 index 0000000..2f6358b --- /dev/null +++ b/framework/application/forms/CMS/Sub/Faq/Temoignage.php @@ -0,0 +1,16 @@ +setLabel('Témoignage'); + $temoignage->setAttrib('rows', 3); + $this->addElement($temoignage); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Faq/Temoignages.php b/framework/application/forms/CMS/Sub/Faq/Temoignages.php new file mode 100644 index 0000000..10e2896 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Faq/Temoignages.php @@ -0,0 +1,15 @@ +setBaseSubForm($base); + $this->setNewLegend('Nouvau témoignage'); + $this->setBaseLegend('Editer le témoignage « $temoignage »'); + } + +} + +?> diff --git a/framework/application/views/helpers/Temoignages.php b/framework/application/views/helpers/Temoignages.php new file mode 100644 index 0000000..c4016b0 --- /dev/null +++ b/framework/application/views/helpers/Temoignages.php @@ -0,0 +1,18 @@ +view->headScript()->addScriptAndStyle('rightbar'); + $res = ''; + return $res; + } + +} + +?> diff --git a/framework/application/views/scripts/templates/faq.phtml b/framework/application/views/scripts/templates/faq.phtml index 798e426..78c1784 100644 --- a/framework/application/views/scripts/templates/faq.phtml +++ b/framework/application/views/scripts/templates/faq.phtml @@ -4,5 +4,5 @@

titre ?>

faq($this->questions); ?> - rightbar() ?> + temoignages($this->titre_temoignages,$this->temoignages) ?> \ No newline at end of file diff --git a/less/faq.less b/less/faq.less index 801f5bb..01d3129 100644 --- a/less/faq.less +++ b/less/faq.less @@ -9,4 +9,34 @@ .faq dd{ margin:12px 0 20px 0; +} + +#rightbar.temoignages{ + h2{ + color:#e30186; + font-size: 24px; + } + + article{ + background-color:#f1f0f0; + color:#898989; + font-weight: 300; + font-size: 13px; + font-style: italic; + padding:20px 25px; + margin:0 0 30px 0; + position:relative; + + &:after { + border-color: transparent #f1f0f0; + border-style: solid; + border-width: 0 0 17px 20px; + bottom: -17px; + content: ""; + display: block; + position: absolute; + right: 91px; + width: 0; + } + } } \ No newline at end of file -- 2.39.5