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
00035 class Mage_Adminhtml_Block_Review_Main extends Mage_Adminhtml_Block_Widget_Grid_Container
00036 {
00037 public function __construct()
00038 {
00039 $this->_addButtonLabel = Mage::helper('review')->__('Add New Review');
00040 parent::__construct();
00041
00042 $this->_controller = 'review';
00043
00044
00045 $customerId = $this->getRequest()->getParam('customerId', false);
00046 $customerName = '';
00047 if ($customerId) {
00048 $customer = Mage::getModel('customer/customer')->load($customerId);
00049 $customerName = $customer->getFirstname() . ' ' . $customer->getLastname();
00050 }
00051
00052 if( Mage::registry('usePendingFilter') === true ) {
00053 if ($customerName) {
00054 $this->_headerText = Mage::helper('review')->__('Pending reviews of customer `%s`', $customerName);
00055 } else {
00056 $this->_headerText = Mage::helper('review')->__('Pending reviews');
00057 }
00058 $this->_removeButton('add');
00059 } else {
00060 if ($customerName) {
00061 $this->_headerText = Mage::helper('review')->__('All reviews of customer `%s`', $customerName);
00062 } else {
00063 $this->_headerText = Mage::helper('review')->__('All Reviews');
00064 }
00065 }
00066 }
00067 }