如何在 (adminhtml) order->view (Magento CE 1.9.1) 上添加标签

How to add a tab on (adminhtml) order->view (Magento CE 1.9.1)

我需要在 Magento CE 1.9.1 上的 (adminhtml) order->view 添加一个新标签。我已经尝试使用 Google 上的一些指南,但没有任何效果。有人可以帮助我吗?

这是示例模块。

文件:app/code/local/Namespace/Newtab/Block/Adminhtml/Order/View/Tab/Contents.php

<?php
class Namespace_Newtab_Block_Adminhtml_Order_View_Tab_Contents
    extends Mage_Adminhtml_Block_Template
    implements Mage_Adminhtml_Block_Widget_Tab_Interface
{    
    public function _construct()
    {
        parent::_construct();
        $this->setTemplate('namespace/newtab/order/view/tab/contents.phtml');

    }

    public function getTabLabel() {
        return $this->__('New Tab');
    }

    public function getTabTitle() {
        return $this->__('New Tab');
    }

    public function canShowTab() {
        return true;
    }

    public function isHidden() {
        return false;
    }

    public function getOrder(){
        return Mage::registry('current_order');
    }
}

文件:app/code/local/Namespace/Newtab/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Namespace_Newtab>
            <version>1.0.1</version>
        </Namespace_Newtab>
    </modules>
    <global>
        <blocks>
            <namespace_newtab>
                <class>Namespace_Newtab_Block</class>
            </namespace_newtab>
        </blocks>
    </global>       
    <adminhtml>
       <layout>
            <updates>
                <namespace_newtab>
                    <file>namespace_newtab.xml</file>
                </namespace_newtab>
            </updates>
        </layout>
    </adminhtml>
</config>

文件:app/design/adminhtml/default/default/layout/namespace_newtab.xml

<?xml version="1.0"?>
<layout>
    <adminhtml_sales_order_view>
        <reference name="sales_order_tabs">
            <action method="addTab">
                <name>namespace_newtab_order_view_tab</name>
                 <block>namespace_newtab/adminhtml_order_view_tab_contents</block>
            </action>
        </reference>
</adminhtml_sales_order_view>
</layout>  

文件:app/design/adminhtml/default/default/template/namespace/newtab/order/view/tab/contents.phtml

<?php echo 'Hello World!';?>  

文件:app/etc/modules/Namespace_Newtab.xml

<?xml version="1.0"?>
<config>
     <modules>
        <Namespace_Newtab>
            <active>true</active>
            <codePool>local</codePool>
        </Namespace_Newtab>
    </modules>
</config>