<?php
/**
 * 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@magentocommerce.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.magentocommerce.com for more information.
 *
 * @category   design_default
 * @package    Mage
 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php  $_order = $this->getOrder() ?>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<div class="page-head button-level">
    <h3><?php echo $this->__('Order #%s - %s', $_order->getRealOrderId(), $_order->getStatusLabel()) ?></h3>
    <?php if($this->helper('rss/order')->isStatusNotificationAllow()): ?>
        <a href="<?php echo $this->helper('rss/order')->getStatusHistoryRssUrl($_order) ?>" class="link-feed"><?php echo $this->__('Subscribe to Order Status') ?></a>
        <span class="pipe">|</span>
    <?php endif; ?>
    <?php if ($this->helper('sales/reorder')->canReorder($_order)) : ?>
        <a href="<?php echo $this->getReorderUrl($_order) ?>" class="link-cart"><?php echo $this->__('Reorder') ?></a>
        <span class="pipe">|</span>
    <?php endif ?>
    <a href="<?php echo $this->getPrintUrl($_order) ?>" class="link-cart" onclick="this.target='_blank';"><?php echo $this->__('Print Order') ?></a>
</div>
<?php echo $this->getStatusHistoryRssUrl($_order) ?>
<div class="order-access">
<div class="order-info">
<?php echo $this->__('About This Order:') ?>
<ul>
  <?php $_links = $this->getLinks(); ?>
    <?php foreach ($_links as $_link): ?>
      <?php if($_link->getUrl()): ?>
        <li><a href="<?php echo $_link->getUrl() ?>"><?php echo $_link->getLabel() ?></a></li>
      <?php else: ?>
        <li class="selected"><?php echo $_link->getLabel() ?></li>
      <?php endif; ?>
    <?php endforeach; ?>
</ul>
</div>
</div>


<p><?php echo $this->__('Order Date: %s', $this->formatDate($_order->getCreatedAt(), 'long')) ?></p>
<?php if (!$_order->getIsVirtual()): ?>
<div class="col2-set generic-box">
    <div class="col-1">
        <h4><?php echo $this->__('Shipping Address') ?></h4>
        <address><?php echo $_order->getShippingAddress()->format('html') ?></address>
    </div>
    <div class="col-2">
        <h4><?php echo $this->__('Shipping Method') ?><?php /* | <a href="#"><?php echo $this->__('Track Order') ?></a>*/ ?></h4>
        <?php if ($_order->getShippingDescription()): ?>
            <?php echo $_order->getShippingDescription() ?>
        <?php else: ?>
            <?php echo $this->helper('sales')->__('No shipping information available'); ?>
        <?php endif; ?>
    </div>
</div>
<?php endif; ?>
<div class="col2-set generic-box">
    <div class="col-1">
        <h4><?php echo $this->__('Billing Address') ?></h4>
        <address><?php echo $_order->getBillingAddress()->format('html') ?></address>
    </div>
    <div class="col-2">
        <h4><?php echo $this->__('Payment Method') ?></h4>
        <?php echo $this->getPaymentInfoHtml() ?>
    </div>
</div>