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_System_Store_Grid extends Mage_Adminhtml_Block_Widget_Grid
00036 {
00037
00038 public function __construct()
00039 {
00040 parent::__construct();
00041 $this->setId('storeGrid');
00042 $this->setSaveParametersInSession(true);
00043 }
00044
00045 protected function _prepareCollection()
00046 {
00047 $collection = Mage::getModel('core/website')
00048 ->getCollection()
00049 ->joinGroupAndStore();
00050 $this->setCollection($collection);
00051 parent::_prepareCollection();
00052 return $this;
00053 }
00054
00055 protected function _prepareColumns()
00056 {
00057 $this->addColumn('website_title', array(
00058 'header' => Mage::helper('core')->__('Website Name'),
00059 'align' =>'left',
00060 'index' => 'name',
00061 'filter_index' => 'main_table.name',
00062 'renderer' => 'adminhtml/system_store_grid_render_website'
00063 ));
00064
00065 $this->addColumn('group_title', array(
00066 'header' => Mage::helper('core')->__('Store Name'),
00067 'align' =>'left',
00068 'index' => 'group_title',
00069 'filter_index' => 'group_table.name',
00070 'renderer' => 'adminhtml/system_store_grid_render_group'
00071 ));
00072
00073 $this->addColumn('store_title', array(
00074 'header' => Mage::helper('core')->__('Store View Name'),
00075 'align' =>'left',
00076 'index' => 'store_title',
00077 'filter_index' => 'store_table.name',
00078 'renderer' => 'adminhtml/system_store_grid_render_store'
00079 ));
00080
00081 return parent::_prepareColumns();
00082 }
00083
00084 }