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_Edit_Tab_History extends Mage_Adminhtml_Block_Widget_Grid
00035 {
00036 public function __construct()
00037 {
00038 parent::__construct();
00039 $this->setId('history_grid');
00040 $this->setDefaultSort('performed_at', 'desc');
00041 $this->setUseAjax(true);
00042 }
00043
00044 protected function _prepareCollection()
00045 {
00046 $collection = Mage::getResourceModel('dataflow/profile_history_collection')
00047 ->joinAdminUser()
00048 ->addFieldToFilter('profile_id', Mage::registry('current_convert_profile')->getId());
00049 $this->setCollection($collection);
00050 return parent::_prepareCollection();
00051 }
00052
00053 protected function _prepareColumns()
00054 {
00055 $this->addColumn('action_code', array(
00056 'header' => Mage::helper('adminhtml')->__('Profile Action'),
00057 'index' => 'action_code',
00058 'filter' => 'adminhtml/system_convert_profile_edit_filter_action',
00059 'renderer' => 'adminhtml/system_convert_profile_edit_renderer_action',
00060 ));
00061
00062 $this->addColumn('performed_at', array(
00063 'header' => Mage::helper('adminhtml')->__('Performed At'),
00064 'type' => 'datetime',
00065 'index' => 'performed_at',
00066 'width' => '150px',
00067 ));
00068
00069 $this->addColumn('firstname', array(
00070 'header' => Mage::helper('adminhtml')->__('Firstname'),
00071 'index' => 'firstname',
00072 ));
00073
00074 $this->addColumn('lastname', array(
00075 'header' => Mage::helper('adminhtml')->__('Lastname'),
00076 'index' => 'lastname',
00077 ));
00078
00079 return parent::_prepareColumns();
00080 }
00081
00082 public function getGridUrl()
00083 {
00084 return $this->getUrl('*/*/history', array('_current' => true));
00085 }
00086 }