'date DESC'); protected function _bindListColumns($list) { $list->addColumn('no', 'no') ->addColumn('date', 'date', array('orderBy' => 'date')) ->addColumn('image', 'image') ->addColumn('item', 'item', array('attribs' => array('width' => 500, 'valign' => 'top'))) ->addColumn( 'options', 'options', array( 'actions' => array('edit', 'delete'), ) ); return $this; } protected function _bindFormFields($form) { $form->addElement('date', 'date', array('label' => 'Publication Date', 'required' => true)); $form->addElement('text', 'title', array('label' => 'Associations Title', 'required' => true)); $form->addElement( 'textarea', 'metaDescription', array('label' => 'Meta Description', 'rows' => 3, 'required' => false) ); $form->addElement( 'textarea', 'metaKeywords', array('label' => 'Meta Keywords', 'rows' => 3, 'required' => false) ); $form->addElement( 'extendedImage', 'image', array( 'label' => 'Image', 'required' => false, 'resize' => self::IMAGE_WIDTH . 'x' . self::IMAGE_HEIGHT, ) ); $form->addElement('textarea', 'introduction', array('label' => 'Introduction', 'rows' => 5, 'required' => true)); $form->addElement('htmlEditor', 'content', array('label' => 'Content', 'required' => true, 'hasMsWordNote' => true)); $form->image->addValidator('File_IsImage'); return $this; } protected function _doNew() { $form = $this->_getNewForm(); $data = array('date' => date('Y-m-d'), 'linkType' => 'none'); $form->setDefaults($data); $this->_renderMainForm($form); } protected function _renderMainForm($form) { $this->doc->addStylesheet('css/admin-news.css'); return parent::_renderMainForm($form); } }