00001 <?php 00002 /** 00003 * Magento 00004 * 00005 * NOTICE OF LICENSE 00006 * 00007 * This source file is subject to the Open Software License (OSL 3.0) 00008 * that is bundled with this package in the file LICENSE.txt. 00009 * It is also available through the world-wide-web at this URL: 00010 * http://opensource.org/licenses/osl-3.0.php 00011 * If you did not receive a copy of the license and are unable to 00012 * obtain it through the world-wide-web, please send an email 00013 * to license@magentocommerce.com so we can send you a copy immediately. 00014 * 00015 * DISCLAIMER 00016 * 00017 * Do not edit or add to this file if you wish to upgrade Magento to newer 00018 * versions in the future. If you wish to customize Magento for your 00019 * needs please refer to http://www.magentocommerce.com for more information. 00020 * 00021 * @category Mage 00022 * @package Mage_Adminhtml 00023 * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) 00024 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 00025 */ 00026 00027 /** 00028 * Order view tabs 00029 * 00030 * @category Mage 00031 * @package Mage_Adminhtml 00032 * @author Magento Core Team <core@magentocommerce.com> 00033 */ 00034 class Mage_Adminhtml_Block_Sales_Order_View_Tabs extends Mage_Adminhtml_Block_Widget_Tabs 00035 { 00036 /** 00037 * Retrieve available order 00038 * 00039 * @return Mage_Sales_Model_Order 00040 */ 00041 public function getOrder() 00042 { 00043 if ($this->hasOrder()) { 00044 return $this->getData('order'); 00045 } 00046 if (Mage::registry('current_order')) { 00047 return Mage::registry('current_order'); 00048 } 00049 if (Mage::registry('order')) { 00050 return Mage::registry('order'); 00051 } 00052 Mage::throwException(Mage::helper('sales')->__('Can\'t get order instance')); 00053 } 00054 00055 public function __construct() 00056 { 00057 parent::__construct(); 00058 $this->setId('sales_order_view_tabs'); 00059 $this->setDestElementId('sales_order_view'); 00060 $this->setTitle(Mage::helper('sales')->__('Order View')); 00061 } 00062 00063 protected function _beforeToHtml() 00064 { 00065 // $this->addTab('order_info', array( 00066 // 'label' => Mage::helper('sales')->__('Information'), 00067 // 'title' => Mage::helper('sales')->__('Order Information'), 00068 // 'content' => $this->getLayout()->createBlock('adminhtml/sales_order_view_tab_info')->toHtml(), 00069 // 'active' => true 00070 // )); 00071 // 00072 // $this->addTab('order_invoices', array( 00073 // 'label' => Mage::helper('catalogrule')->__('Invoices'), 00074 // 'title' => Mage::helper('catalogrule')->__('Order Invoices'), 00075 // 'content' => $this->getLayout()->createBlock('adminhtml/sales_order_view_tab_invoices')->toHtml(), 00076 // )); 00077 // 00078 // $this->addTab('order_creditmemos', array( 00079 // 'label' => Mage::helper('catalogrule')->__('Credit Memos'), 00080 // 'title' => Mage::helper('catalogrule')->__('Order Credit Memos'), 00081 // 'content' => $this->getLayout()->createBlock('adminhtml/sales_order_view_tab_creditmemos')->toHtml(), 00082 // )); 00083 // 00084 // if (!$this->getOrder()->getIsVirtual()) { 00085 // $this->addTab('order_shipments', array( 00086 // 'label' => Mage::helper('catalogrule')->__('Shipments'), 00087 // 'title' => Mage::helper('catalogrule')->__('Order Shipments'), 00088 // 'content' => $this->getLayout()->createBlock('adminhtml/sales_order_view_tab_shipments')->toHtml(), 00089 // )); 00090 // } 00091 // 00092 // /*$this->addTab('order_giftmessages', array( 00093 // 'label' => Mage::helper('catalogrule')->__('Gift Messages'), 00094 // 'title' => Mage::helper('catalogrule')->__('Order Gift Messages'), 00095 // 'content' => 'Gift Messages', 00096 // ));*/ 00097 // 00098 // $this->addTab('order_history', array( 00099 // 'label' => Mage::helper('catalogrule')->__('Comments History'), 00100 // 'title' => Mage::helper('catalogrule')->__('Order History'), 00101 // 'content' => $this->getLayout()->createBlock('adminhtml/sales_order_view_tab_history')->toHtml(), 00102 // )); 00103 return parent::_beforeToHtml(); 00104 } 00105 }