]> _ Git - ccgm.git/commitdiff
wip #1785 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 29 Nov 2017 17:36:01 +0000 (17:36 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 29 Nov 2017 17:36:01 +0000 (17:36 +0000)
framework/application/Bootstrap.php
framework/application/forms/CMS/News.php [new file with mode: 0644]
framework/application/views/scripts/templates/news.phtml [new file with mode: 0644]

index 5cc08ac14f7167d0f60a2bdd3a3d28250e289232..ef86a1d05d68adffed7cbe45efbf50d850c96783 100644 (file)
@@ -68,6 +68,7 @@ class Bootstrap extends CubeIT_Bootstrap {
                $templates['Recherche clinique'] = array('listing' => 'Listing');
                $templates['Parcours patient'] = array('parcours' => 'Parcours', 'soins' => 'Soins support');
                $templates['Traitements'] = array('traitement' => 'Traitement (Texte avec accordéon)');
+               $templates['Actualités'] = array('news' => 'Actualités');
                $templates['Infos pratiques'] = array('plan' => 'Plan du centre',
                        'acces' => 'Plan d\'accès',
                        'rendezvous' => 'Demande de rendez-vous');
diff --git a/framework/application/forms/CMS/News.php b/framework/application/forms/CMS/News.php
new file mode 100644 (file)
index 0000000..ba48622
--- /dev/null
@@ -0,0 +1,18 @@
+<?php\r
+\r
+class CCGM_Form_CMS_News extends CCGM_Form_CMS_Default {\r
+       public function init() {\r
+               parent::init();\r
+\r
+               $contenus = new CCGM_Form_Element_Markitup('text');\r
+               $contenus->setLabel('Texte d\'introduction');\r
+               $contenus->setAttrib('rows', 5);\r
+               $this->addElement($contenus);\r
+\r
+               $news = new CCGM_Form_CMS_Element_News('news_items');\r
+               $news->setLabel('Actualités');\r
+               $this->addElement($news);\r
+\r
+               $this->removeElement('sidebar');\r
+       }\r
+}
\ No newline at end of file
diff --git a/framework/application/views/scripts/templates/news.phtml b/framework/application/views/scripts/templates/news.phtml
new file mode 100644 (file)
index 0000000..14fcde2
--- /dev/null
@@ -0,0 +1,11 @@
+<?php\r
+$this->contentWidth = 980;\r
+?>\r
+\r
+<section id="content">\r
+       <div id="c">\r
+               <?php\r
+               echo $this->markupDotclear($this->text);\r
+               ?>\r
+       </div>\r
+</section>
\ No newline at end of file