]> _ Git - ccgm.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 14 Aug 2013 15:10:53 +0000 (15:10 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 14 Aug 2013 15:10:53 +0000 (15:10 +0000)
css/rightbar.css [new file with mode: 0644]
framework/application/Bootstrap.php
framework/application/forms/CMS/Default.php
framework/application/forms/CMS/Sub/Sidebar.php [new file with mode: 0644]
framework/application/forms/Element/Markitup/Essential.php [new file with mode: 0644]
framework/application/views/helpers/Rightbar.php [new file with mode: 0644]
framework/application/views/scripts/common/content.phtml
framework/application/views/scripts/templates/text.phtml

diff --git a/css/rightbar.css b/css/rightbar.css
new file mode 100644 (file)
index 0000000..95b5920
--- /dev/null
@@ -0,0 +1,33 @@
+#rightbar{
+       width:262px;
+       display:inline-block;
+}
+
+#rightbar>img{
+       display: block;
+       margin: 0 0 17px 0;
+}
+
+#rightbar>img,
+#rightbar>section{
+       border-radius: 5px;
+       border:1px solid #c7c5c5;
+       width:262px;
+       box-sizing: border-box;
+}
+
+#rightbar>section{
+       font-weight: 300;
+       font-size: 13px;
+       padding:0 20px;
+}
+
+#rightbar>section strong{
+       font-weight: 500;
+}
+
+#content>div#c{
+       width:443px;
+       display: inline-block;
+       margin:0 51px 0 0;
+}
\ No newline at end of file
index 817dd6215b0374ca4be04d6f62671461e1526580..ab77aa03b5c7d95acd5a1b507108b4e2bbc39407 100644 (file)
@@ -47,8 +47,13 @@ class Bootstrap extends CubeIT_Bootstrap {
         */
        public function getCMSTemplates() {
                $templates = array();
-               $templates['Génériques'] = array('text' => 'Page de texte');
+               $templates['Génériques'] = array('text' => 'Page de texte', 'liens' => 'Liens', 'faq' => 'Questions / Réponses', 'temoignages' => 'Témoignages');
                $templates['Accueil'] = array('home' => 'Page d\'accueil');
+               $templates['Le centre'] = array('equipe' => 'L\'équipe');
+               $templates['Parcours patient'] = array('parcours' => 'Parcours');
+               $templates['Infos pratiques'] = array('plan' => 'Plan du centre',
+                       'acces' => 'Plan d\accès',
+                       'rendezvous' => 'Demande de rendez-vous');
                $templates['Redirections'] = array(
                        'externalredirection' => 'Redirection externe',
                        'nextredirection' => 'Redirection vers la première sous-rubrique',
index 75370074a4e6ba42492027a6f83f85e261e8d810..b655c58919d7536afb6df07d88687071f4f6703d 100644 (file)
@@ -9,6 +9,10 @@ class CCGM_Form_CMS_Default extends CCGM_Form_CMS {
                $image->setLabel('Image en tête des contenus');
                $image->setMaxItems(1);
                $this->addElement($image);
+
+               $sidebar = new CCGM_Form_CMS_Sub_Sidebar('sidebar');
+               $sidebar->setLegend('Colonne de droite');
+               $this->addSubForm($sidebar, 'sidebar');
        }
 
 }
diff --git a/framework/application/forms/CMS/Sub/Sidebar.php b/framework/application/forms/CMS/Sub/Sidebar.php
new file mode 100644 (file)
index 0000000..d43f344
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+
+class CCGM_Form_CMS_Sub_Sidebar extends CubeIT_Form_SubForm {
+
+       public function init() {
+               parent::init();
+
+               $image = new CubeIT_Form_Element_File_Image('image');
+               $image->setLabel('Image');
+               $image->setMaxItems(1);
+               $this->addElement($image);
+
+               $contenu = new CCGM_Form_Element_Markitup_Essential('text');
+               $contenu->setLabel('Bloc de texte');
+               $contenu->setAttrib('rows', 6);
+               $this->addElement($contenu);
+       }
+
+}
+
+?>
diff --git a/framework/application/forms/Element/Markitup/Essential.php b/framework/application/forms/Element/Markitup/Essential.php
new file mode 100644 (file)
index 0000000..b009366
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+class CCGM_Form_Element_Markitup_Essential extends CubeIT_Form_Element_Markitup {
+
+       public function initSettings() {
+               $this->addBold();
+               $this->addItalic();
+               $this->addLink();
+       }
+
+}
+
+?>
diff --git a/framework/application/views/helpers/Rightbar.php b/framework/application/views/helpers/Rightbar.php
new file mode 100644 (file)
index 0000000..82ff6ff
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+
+class CCGM_View_Helper_Rightbar extends Zend_View_Helper_Abstract {
+
+       public function rightbar() {
+               if (!isset($this->view->sidebar)) {
+                       return;
+               }
+
+               $s = $this->view->sidebar;
+               if (trim($s['text']) == '' && !count($s['image'])) {
+                       return;
+               }
+               
+               $this->view->headScript()->addScriptAndStyle('rightbar');
+
+               $res.='<aside id="rightbar">';
+               $res.=$this->view->imageProcess($s['image'], '', 262, null, array(), 'R');
+               $res.='<section>';
+               $res.=$this->view->markupDotclear($s['text']);
+               $res.='</section>';
+               $res.='</aside>';
+               return $res;
+       }
+
+}
+
+?>
index b8ab85773881c44a369d54e504482cb6ba777e6b..0b653aee38de7137417c4f1ad5de46d2d3d6462a 100644 (file)
@@ -3,7 +3,7 @@
 $content = $this->layout()->content . "\n";\r
 \r
 \r
-if ($this->currentPage->getTemplate() == 'home') {\r
+if (isset($this->currentPage) && $this->currentPage->getTemplate() == 'home') {\r
        $c = $content;\r
 } else {\r
        $leftbar = $this->leftbar();\r
index c8f95fb8e70b4ce1750d926f7827f222712ab25b..ac63c8a6f55ea45dbb10df5eda5acb3aa36e4e77 100644 (file)
@@ -1,3 +1,6 @@
 <section id="content">\r
-       <?php echo $this->markupDotclear($this->text); ?>\r
+       <div id="c">\r
+               <?php echo $this->markupDotclear($this->text); ?>\r
+       </div>\r
+       <?php echo $this->rightbar() ?>\r
 </section>
\ No newline at end of file