From: vincent@cubedesigners.com Date: Wed, 14 Aug 2013 15:10:53 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0ec532467471602e20fc4d9be7ba04ff8916348f;p=ccgm.git --- diff --git a/css/rightbar.css b/css/rightbar.css new file mode 100644 index 0000000..95b5920 --- /dev/null +++ b/css/rightbar.css @@ -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 diff --git a/framework/application/Bootstrap.php b/framework/application/Bootstrap.php index 817dd62..ab77aa0 100644 --- a/framework/application/Bootstrap.php +++ b/framework/application/Bootstrap.php @@ -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', diff --git a/framework/application/forms/CMS/Default.php b/framework/application/forms/CMS/Default.php index 7537007..b655c58 100644 --- a/framework/application/forms/CMS/Default.php +++ b/framework/application/forms/CMS/Default.php @@ -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 index 0000000..d43f344 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Sidebar.php @@ -0,0 +1,21 @@ +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 index 0000000..b009366 --- /dev/null +++ b/framework/application/forms/Element/Markitup/Essential.php @@ -0,0 +1,13 @@ +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 index 0000000..82ff6ff --- /dev/null +++ b/framework/application/views/helpers/Rightbar.php @@ -0,0 +1,28 @@ +view->sidebar)) { + return; + } + + $s = $this->view->sidebar; + if (trim($s['text']) == '' && !count($s['image'])) { + return; + } + + $this->view->headScript()->addScriptAndStyle('rightbar'); + + $res.=''; + return $res; + } + +} + +?> diff --git a/framework/application/views/scripts/common/content.phtml b/framework/application/views/scripts/common/content.phtml index b8ab857..0b653ae 100644 --- a/framework/application/views/scripts/common/content.phtml +++ b/framework/application/views/scripts/common/content.phtml @@ -3,7 +3,7 @@ $content = $this->layout()->content . "\n"; -if ($this->currentPage->getTemplate() == 'home') { +if (isset($this->currentPage) && $this->currentPage->getTemplate() == 'home') { $c = $content; } else { $leftbar = $this->leftbar(); diff --git a/framework/application/views/scripts/templates/text.phtml b/framework/application/views/scripts/templates/text.phtml index c8f95fb..ac63c8a 100644 --- a/framework/application/views/scripts/templates/text.phtml +++ b/framework/application/views/scripts/templates/text.phtml @@ -1,3 +1,6 @@
- markupDotclear($this->text); ?> +
+ markupDotclear($this->text); ?> +
+ rightbar() ?>
\ No newline at end of file