00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class Mage_Adminhtml_Block_Review_Product_Grid extends Mage_Adminhtml_Block_Catalog_Product_Grid
00035 {
00036
00037 public function __construct()
00038 {
00039 parent::__construct();
00040 $this->setRowClickCallback('review.gridRowClick');
00041 $this->setUseAjax(true);
00042 }
00043
00044 protected function _prepareColumns()
00045 {
00046 $this->addColumn('entity_id', array(
00047 'header' => Mage::helper('review')->__('ID'),
00048 'width' => '50px',
00049 'index' => 'entity_id',
00050 ));
00051
00052 $this->addColumn('name', array(
00053 'header' => Mage::helper('review')->__('Name'),
00054 'index' => 'name',
00055 ));
00056
00057 if ((int)$this->getRequest()->getParam('store', 0)) {
00058 $this->addColumn('custom_name', array(
00059 'header' => Mage::helper('review')->__('Name In Store'),
00060 'index' => 'custom_name'
00061 ));
00062 }
00063
00064 $this->addColumn('sku', array(
00065 'header' => Mage::helper('review')->__('SKU'),
00066 'width' => '80px',
00067 'index' => 'sku'
00068 ));
00069
00070 $this->addColumn('price', array(
00071 'header' => Mage::helper('review')->__('Price'),
00072 'type' => 'currency',
00073 'index' => 'price'
00074 ));
00075
00076 $this->addColumn('qty', array(
00077 'header' => Mage::helper('review')->__('Qty'),
00078 'width' => '130px',
00079 'type' => 'number',
00080 'index' => 'qty'
00081 ));
00082
00083 $this->addColumn('status', array(
00084 'header' => Mage::helper('review')->__('Status'),
00085 'width' => '90px',
00086 'index' => 'status',
00087 'type' => 'options',
00088 'source' => 'catalog/product_status',
00089 ));
00090
00091
00092
00093
00094 if (!Mage::app()->isSingleStoreMode()) {
00095 $this->addColumn('websites',
00096 array(
00097 'header'=> Mage::helper('review')->__('Websites'),
00098 'width' => '100px',
00099 'sortable' => false,
00100 'index' => 'websites',
00101 'type' => 'options',
00102 'options' => Mage::getModel('core/website')->getCollection()->toOptionHash(),
00103 ));
00104 }
00105 }
00106
00107 public function getGridUrl()
00108 {
00109 return $this->getUrl('*/*/productGrid', array('_current'=>true));
00110 }
00111
00112 public function getRowUrl($row)
00113 {
00114 return $this->getUrl('*/*/jsonProductInfo', array('id' => $row->getId()));
00115 }
00116
00117 protected function _prepareMassaction()
00118 {
00119 return $this;
00120 }
00121 }