<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     default_default
 * @copyright   Copyright (c) 2006-2017 X.commerce, Inc. and affiliates (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
-->

<layout>
    <adminhtml_sales_order_view>
        <reference name="order_item_extra_info">
            <block type="giftmessage/adminhtml_sales_order_view_giftoptions" name="gift_options_link" template="giftmessage/sales/order/view/giftoptions.phtml">
                <block type="giftmessage/adminhtml_sales_order_view_items" name="gift_options_item_data" template="giftmessage/sales/order/view/items.phtml" />
            </block>
        </reference>
        <reference name="order_tab_info">
            <block type="adminhtml/template" name="popup_window" template="giftmessage/popup.phtml">
                <block type="giftmessage/adminhtml_sales_order_view_form" name="gift_options_form" template="giftmessage/giftoptionsform.phtml" />
             </block>
        </reference>
    </adminhtml_sales_order_view>

    <adminhtml_sales_order_create_index>
        <reference name="order_item_extra_info">
            <block type="giftmessage/adminhtml_sales_order_create_giftoptions" name="gift_options_link" template="giftmessage/sales/order/create/giftoptions.phtml">
                <block type="giftmessage/adminhtml_sales_order_create_items" name="gift_options_item_data" template="giftmessage/sales/order/create/items.phtml" />
            </block>
        </reference>
        <reference name="items_grid">
            <block type="adminhtml/template" name="popup_window" template="giftmessage/popup.phtml">
                <block type="giftmessage/adminhtml_sales_order_create_form" name="gift_options_form" template="giftmessage/giftoptionsform.phtml" />
             </block>
        </reference>
    </adminhtml_sales_order_create_index>

    <adminhtml_sales_order_create_load_block_data>
        <reference name="order_item_extra_info">
            <block type="giftmessage/adminhtml_sales_order_create_giftoptions" name="gift_options_link" template="giftmessage/sales/order/create/giftoptions.phtml">
                <block type="giftmessage/adminhtml_sales_order_create_items" name="gift_options_item_data" template="giftmessage/sales/order/create/items.phtml" />
            </block>
        </reference>
        <reference name="items_grid">
            <block type="adminhtml/template" name="popup_window" template="giftmessage/popup.phtml">
                <block type="giftmessage/adminhtml_sales_order_create_form" name="gift_options_form" template="giftmessage/giftoptionsform.phtml" />
             </block>
        </reference>
    </adminhtml_sales_order_create_load_block_data>

    <adminhtml_sales_order_create_load_block_items>
        <reference name="order_item_extra_info">
            <block type="giftmessage/adminhtml_sales_order_create_giftoptions" name="gift_options_link" template="giftmessage/sales/order/create/giftoptions.phtml">
                <block type="giftmessage/adminhtml_sales_order_create_items" name="gift_options_item_data" template="giftmessage/sales/order/create/items.phtml" />
            </block>
        </reference>
        <reference name="items_grid">
            <block type="adminhtml/template" name="popup_window" template="giftmessage/popup.phtml">
                <block type="giftmessage/adminhtml_sales_order_create_form" name="gift_options_form" template="giftmessage/giftoptionsform.phtml" />
             </block>
        </reference>
    </adminhtml_sales_order_create_load_block_items>
</layout>

