loadLayout(); $this->getLayout() ->unsetBlock('root') ->createBlock('core/text_list', 'root') ->append( $this->getLayout()->createBlock( 'ekomimeetsmage/adminhtml_catalog_product_tab', 'ekomimeetsmage_productview' ) ); $this->renderLayout(); } /** * Review grid for all products * */ public function watch_reviewAction() { $this->loadLayout(); $this->getLayout() ->unsetBlock('root') ->createBlock('core/text_list', 'root') ->append( $this->getLayout()->createBlock( 'ekomimeetsmage/adminhtml_watch_review_grid', 'ekomimeetsmage_productview' ) ); $this->renderLayout(); } /** * Review grid for all products * */ public function watch_sentAction() { $this->loadLayout(); $this->getLayout() ->unsetBlock('root') ->createBlock('core/text_list', 'root') ->append( $this->getLayout()->createBlock( 'ekomimeetsmage/adminhtml_watch_sent_grid', 'ekomimeetsmage_sentstatus' ) ); $this->renderLayout(); } /** * Deactivates a review * */ public function deactivate_reviewAction() { $itemIds = $this->getRequest()->getPost('state'); if (count($itemIds) > 0) { $collection = Mage::getModel('ekomimeetsmage/rating_cache') ->getCollection() ->addFieldToFilter('ekomi_rating_cache_id', array("IN"=>$itemIds)); if ($collection->count() > 0) { $collection->setDataToAll('state', 0)->save(); } } $this->_redirect('*/watch/reviews'); } /** * Activates a review * */ public function activate_reviewAction() { $itemIds = $this->getRequest()->getPost('state'); if (count($itemIds) > 0) { $collection = Mage::getModel('ekomimeetsmage/rating_cache') ->getCollection() ->addFieldToFilter('ekomi_rating_cache_id', array("IN"=>$itemIds)); if ($collection->count() > 0) { $collection->setDataToAll('state', 1)->save(); } } $this->_redirect('*/watch/reviews'); } }