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_Gui_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
35: {
36: public function __construct()
37: {
38: parent::__construct();
39: $this->setId('convert_profile_tabs');
40: $this->setDestElementId('edit_form');
41: $this->setTitle(Mage::helper('adminhtml')->__('Import/Export Profile'));
42: }
43:
44: protected function _beforeToHtml()
45: {
46: $profile = Mage::registry('current_convert_profile');
47:
48: $wizardBlock = $this->getLayout()->createBlock('adminhtml/system_convert_gui_edit_tab_wizard');
49: $wizardBlock->addData($profile->getData());
50:
51: $new = !$profile->getId();
52:
53: $this->addTab('wizard', array(
54: 'label' => Mage::helper('adminhtml')->__('Profile Wizard'),
55: 'content' => $wizardBlock->toHtml(),
56: 'active' => true,
57: ));
58:
59: if (!$new) {
60: if ($profile->getDirection()!='export') {
61: $this->addTab('upload', array(
62: 'label' => Mage::helper('adminhtml')->__('Upload File'),
63: 'content' => $this->getLayout()->createBlock('adminhtml/system_convert_gui_edit_tab_upload')->toHtml(),
64: ));
65: }
66:
67: $this->addTab('run', array(
68: 'label' => Mage::helper('adminhtml')->__('Run Profile'),
69: 'content' => $this->getLayout()->createBlock('adminhtml/system_convert_profile_edit_tab_run')->toHtml(),
70: ));
71:
72: $this->addTab('view', array(
73: 'label' => Mage::helper('adminhtml')->__('Profile Actions XML'),
74: 'content' => $this->getLayout()->createBlock('adminhtml/system_convert_gui_edit_tab_view')->initForm()->toHtml(),
75: ));
76:
77: $this->addTab('history', array(
78: 'label' => Mage::helper('adminhtml')->__('Profile History'),
79: 'content' => $this->getLayout()->createBlock('adminhtml/system_convert_profile_edit_tab_history')->toHtml(),
80: ));
81: }
82:
83: return parent::_beforeToHtml();
84: }
85: }
86: