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_Report_Review_Detail_Grid extends Mage_Adminhtml_Block_Widget_Grid
00035 {
00036
00037 public function __construct()
00038 {
00039 parent::__construct();
00040 $this->setId('reviews_grid');
00041 }
00042
00043 protected function _prepareCollection()
00044 {
00045
00046
00047
00048
00049
00050
00051
00052
00053 $collection = Mage::getResourceModel('reports/review_collection')
00054 ->addProductFilter((int)$this->getRequest()->getParam('id'));
00055
00056 $this->setCollection($collection);
00057
00058 parent::_prepareCollection();
00059
00060 return $this;
00061 }
00062
00063 protected function _prepareColumns()
00064 {
00065
00066 $this->addColumn('nickname', array(
00067 'header' =>Mage::helper('reports')->__('Customer'),
00068 'width' =>'100px',
00069 'index' =>'nickname'
00070 ));
00071
00072 $this->addColumn('title', array(
00073 'header' =>Mage::helper('reports')->__('Title'),
00074 'width' =>'150px',
00075 'index' =>'title'
00076 ));
00077
00078 $this->addColumn('detail', array(
00079 'header' =>Mage::helper('reports')->__('Detail'),
00080 'index' =>'detail'
00081 ));
00082
00083 $this->addColumn('created_at', array(
00084 'header' =>Mage::helper('reports')->__('Created at'),
00085 'index' =>'created_at',
00086 'width' =>'200px',
00087 'type' =>'datetime'
00088 ));
00089
00090 $this->setFilterVisibility(false);
00091
00092 $this->addExportType('*/*/exportProductDetailCsv', Mage::helper('reports')->__('CSV'));
00093 $this->addExportType('*/*/exportProductDetailExcel', Mage::helper('reports')->__('Excel'));
00094
00095 return parent::_prepareColumns();
00096 }
00097
00098 }
00099