1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25:
26:
27: 28: 29: 30: 31: 32: 33:
34: class Mage_Adminhtml_Block_System_Convert_Profile_Grid extends Mage_Adminhtml_Block_Widget_Grid
35: {
36:
37: public function __construct()
38: {
39: parent::__construct();
40: $this->setId('convertProfileGrid');
41: $this->setDefaultSort('profile_id');
42: }
43:
44: protected function _prepareCollection()
45: {
46: $collection = Mage::getResourceModel('dataflow/profile_collection')
47: ->addFieldToFilter('entity_type', array('null'=>''));
48:
49: $this->setCollection($collection);
50:
51: return parent::_prepareCollection();
52: }
53:
54: protected function _prepareColumns()
55: {
56: $this->addColumn('profile_id', array(
57: 'header' => Mage::helper('adminhtml')->__('ID'),
58: 'width' => '50px',
59: 'index' => 'profile_id',
60: ));
61: $this->addColumn( 'name', array(
62: 'header' => Mage::helper('adminhtml')->__('Profile Name'),
63: 'index' => 'name',
64: ));
65: $this->addColumn('created_at', array(
66: 'header' => Mage::helper('adminhtml')->__('Created At'),
67: 'type' => 'date',
68: 'align' => 'center',
69: 'index' => 'created_at',
70: ));
71: $this->addColumn('updated_at', array(
72: 'header' => Mage::helper('adminhtml')->__('Updated At'),
73: 'type' => 'date',
74: 'align' => 'center',
75: 'index' => 'updated_at',
76: ));
77:
78: $this->addColumn('action', array(
79: 'header' => Mage::helper('adminhtml')->__('Action'),
80: 'width' => '60px',
81: 'align' => 'center',
82: 'sortable' => false,
83: 'filter' => false,
84: 'type' => 'action',
85: 'actions' => array(
86: array(
87: 'url' => $this->getUrl('*/*/edit') . 'id/$profile_id',
88: 'caption' => Mage::helper('adminhtml')->__('Edit')
89: )
90: )
91: ));
92:
93: return parent::_prepareColumns();
94: }
95:
96: public function getRowUrl($row)
97: {
98: return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
99: }
100:
101: }
102:
103: