From: stephen@cubedesigners.com Date: Wed, 4 Mar 2020 18:40:13 +0000 (+0000) Subject: WIP #3413 @7 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=2f13af768e62f8c4ef7694b45beadd5a176fd040;p=ccgm.git WIP #3413 @7 --- diff --git a/framework/application/configs/application.ini b/framework/application/configs/application.ini index 4361fad..d88902e 100644 --- a/framework/application/configs/application.ini +++ b/framework/application/configs/application.ini @@ -72,9 +72,12 @@ seo.robots = false [dev-local : base] dev = true +firephp = false webhost = ccgm.test session.domain = .ccgm.test +bin.imagemagick = /usr/local/bin/convert + minify.js = true minify.css = true diff --git a/framework/application/forms/CMS/Sub/News/News.php b/framework/application/forms/CMS/Sub/News/News.php index 8b70c96..c53c5de 100644 --- a/framework/application/forms/CMS/Sub/News/News.php +++ b/framework/application/forms/CMS/Sub/News/News.php @@ -20,14 +20,24 @@ class CCGM_Form_CMS_Sub_News_News extends CubeIT_Form_List_Model { $this->addElement($date); $image = new CubeIT_Form_Element_File_Image('image'); - $image->setLabel('Image'); - $image->setMaxItems(1); + $image->setLabel('Images'); $this->addElement($image); + $videos = new Zend_Form_Element_Textarea('videos'); + $videos->setLabel('Vidéos (YouTube) : une URL par ligne'); + $videos->setAttrib('placeholder', 'https://www.youtube.com/watch?v=xxxxxx'); + $videos->setAttrib('rows', 4); + $this->addElement($videos); + $content = new CubeIT_Form_Element_Markitup_Basic('content'); $content->setLabel(__('Contents')); $this->addElement($content); + $pdf = new CubeIT_Form_Element_File('pdf'); + $pdf->setLabel('PDF à télécharger'); + $pdf->setMaxItems(1); + $this->addElement($pdf); + $link = new CubeIT_Form_Element_Link(); $link->setLabel('Lien'); $this->addSubForm($link,'link'); diff --git a/framework/application/models/News.php b/framework/application/models/News.php index 0833429..8f0ecff 100644 --- a/framework/application/models/News.php +++ b/framework/application/models/News.php @@ -3,11 +3,13 @@ class CCGM_Model_News extends CubeIT_Model_Data_Table { protected static $_table = 'news'; + protected $title; protected $date; protected $content; protected $link; protected $image; - protected $title; + protected $videos; + protected $pdf; protected $_types = ['link' => 'json']; @@ -18,6 +20,8 @@ class CCGM_Model_News extends CubeIT_Model_Data_Table { $table->addColumn('content', 'text'); $table->addColumn('link', 'text'); $table->addColumn('image', 'text'); + $table->addColumn('videos', 'text'); + $table->addColumn('pdf', 'text'); } -} \ No newline at end of file +} diff --git a/framework/application/views/scripts/news/index.phtml b/framework/application/views/scripts/news/index.phtml index 1f95d41..704cac5 100644 --- a/framework/application/views/scripts/news/index.phtml +++ b/framework/application/views/scripts/news/index.phtml @@ -1,11 +1,29 @@ showtopimage = false; $this->showsidebar = false; +$news = CubeIT_Util_CMS::unserialize($this->news); ?> +

title ?>

+ +
+ + image as $image) { + echo $this->imageProcess($image, '', 1000, null); + } + ?> + + markupDotclear($news->content); ?> + + linkCMS($news->link); ?> + +
+
 news);
+    print_r($news);
 ?>