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_System_Convert_Gui_Grid extends Mage_Adminhtml_Block_Widget_Grid
00035 {
00036
00037 public function __construct()
00038 {
00039 parent::__construct();
00040 $this->setId('convertProfileGrid');
00041 $this->setDefaultSort('profile_id');
00042 }
00043
00044 protected function _prepareCollection()
00045 {
00046 $collection = Mage::getResourceModel('dataflow/profile_collection')
00047 ->addFieldToFilter('entity_type', array('neq'=>''));
00048
00049 $this->setCollection($collection);
00050
00051 return parent::_prepareCollection();
00052 }
00053
00054 protected function _prepareColumns()
00055 {
00056 $this->addColumn('profile_id', array(
00057 'header' => Mage::helper('adminhtml')->__('ID'),
00058 'width' => '50px',
00059 'index' => 'profile_id',
00060 ));
00061 $this->addColumn('name', array(
00062 'header' => Mage::helper('adminhtml')->__('Profile Name'),
00063 'index' => 'name',
00064 ));
00065 $this->addColumn('direction', array(
00066 'header' => Mage::helper('adminhtml')->__('Profile Direction'),
00067 'index' => 'direction',
00068 'type' => 'options',
00069 'options' => array('import'=>'Import', 'export'=>'Export'),
00070 'width' => '120px',
00071 ));
00072 $this->addColumn('entity_type', array(
00073 'header' => Mage::helper('adminhtml')->__('Entity Type'),
00074 'index' => 'entity_type',
00075 'type' => 'options',
00076 'options' => array('product'=>'Products', 'customer'=>'Customers'),
00077 'width' => '120px',
00078 ));
00079
00080 $this->addColumn('store_id', array(
00081 'header' => Mage::helper('adminhtml')->__('Store'),
00082 'type' => 'options',
00083 'align' => 'center',
00084 'index' => 'store_id',
00085 'type' => 'store',
00086 'width' => '200px',
00087 ));
00088
00089 $this->addColumn('created_at', array(
00090 'header' => Mage::helper('adminhtml')->__('Created At'),
00091 'type' => 'datetime',
00092 'align' => 'center',
00093 'index' => 'created_at',
00094 ));
00095 $this->addColumn('updated_at', array(
00096 'header' => Mage::helper('adminhtml')->__('Updated At'),
00097 'type' => 'datetime',
00098 'align' => 'center',
00099 'index' => 'updated_at',
00100 ));
00101
00102 $this->addColumn('action', array(
00103 'header' => Mage::helper('adminhtml')->__('Action'),
00104 'width' => '60px',
00105 'align' => 'center',
00106 'sortable' => false,
00107 'filter' => false,
00108 'type' => 'action',
00109 'actions' => array(
00110 array(
00111 'url' => $this->getUrl('*/*/edit') . 'id/$profile_id',
00112 'caption' => Mage::helper('adminhtml')->__('Edit')
00113 )
00114 )
00115 ));
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132 return parent::_prepareColumns();
00133 }
00134
00135 public function getRowUrl($row)
00136 {
00137 return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
00138 }
00139
00140 }
00141