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_Profile_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('eq'=>''));
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('created_at', array(
00066 'header' => Mage::helper('adminhtml')->__('Created At'),
00067 'type' => 'date',
00068 'align' => 'center',
00069 'index' => 'created_at',
00070 ));
00071 $this->addColumn('updated_at', array(
00072 'header' => Mage::helper('adminhtml')->__('Updated At'),
00073 'type' => 'date',
00074 'align' => 'center',
00075 'index' => 'updated_at',
00076 ));
00077
00078 $this->addColumn('action', array(
00079 'header' => Mage::helper('adminhtml')->__('Action'),
00080 'width' => '60px',
00081 'align' => 'center',
00082 'sortable' => false,
00083 'filter' => false,
00084 'type' => 'action',
00085 'actions' => array(
00086 array(
00087 'url' => $this->getUrl('*/*/edit') . 'id/$profile_id',
00088 'caption' => Mage::helper('adminhtml')->__('Edit')
00089 )
00090 )
00091 ));
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108 return parent::_prepareColumns();
00109 }
00110
00111 public function getRowUrl($row)
00112 {
00113 return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
00114 }
00115
00116 }
00117