From: vincent@cubedesigners.com Date: Tue, 26 Jul 2016 16:50:35 +0000 (+0000) Subject: wip #493 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b95af6cb31a2018728b47e93bb2bb78727fa9e2a;p=fluidbook-v3.git wip #493 @1 --- diff --git a/framework/application/forms/CMS/Sub/Exemples/Fluidbook.php b/framework/application/forms/CMS/Sub/Exemples/Fluidbook.php index 329e657..f3b55d0 100644 --- a/framework/application/forms/CMS/Sub/Exemples/Fluidbook.php +++ b/framework/application/forms/CMS/Sub/Exemples/Fluidbook.php @@ -44,6 +44,11 @@ class Fluidbook_Form_CMS_Sub_Exemples_Fluidbook extends CubeIT_Form_List_Model { $featured->setLabel('Mis en avant'); $this->addElement($featured); + $homeimage = new CubeIT_Form_Element_File_Image('homeimage'); + $homeimage->setLabel('Image pour la page d\'accueil'); + $homeimage->setMaxItems(1); + $this->addElement($homeimage); + $this->setListTitle('Exemples') ->setNewTitle('Créer un exemple') ->setEditTitle('Edition de l\'exemple « $title »') diff --git a/framework/application/models/Reference.php b/framework/application/models/Reference.php index 6853b70..288bde5 100644 --- a/framework/application/models/Reference.php +++ b/framework/application/models/Reference.php @@ -13,6 +13,7 @@ class Fluidbook_Model_Reference extends CubeIT_Model_Data_Table { protected $image; protected $featured; protected $categories; + protected $homeimage; protected $_types = array('categories' => 'list', 'title' => 'json', 'text' => 'json', 'image' => 'json'); @@ -26,6 +27,7 @@ class Fluidbook_Model_Reference extends CubeIT_Model_Data_Table { $table->addColumn('fluidbook_page', 'string', array("default" => '{"fr":2,"en":0}', "length" => 128)); $table->addColumn('featured', 'boolean'); $table->addColumn('image', 'string', array('length' => 64)); + $table->addColumn('homeimage', 'string', array('length' => 64)); $table->addColumn('categories', 'string', array('length' => 64)); return $table; }