<?php
/**
 * aheadWorks Co.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://ecommerce.aheadworks.com/LICENSE-M1.txt
 *
 * @category   AW
 * @package    AW_Mobile
 * @copyright  Copyright (c) 2010-2011 aheadWorks Co. (http://www.aheadworks.com)
 * @license    http://ecommerce.aheadworks.com/LICENSE-M1.txt
 */
/* @var $this Mage_Wishlist_Block_Share_Wishlist */
?>
<div class="in-page">
    <div class="page-head">
        <h3><?php echo $this->htmlEscape($this->getHeader()) ?></h3>
    </div>
    <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
    <?php if ($this->hasWishlistItems()): ?>
    <form action="<?php echo $this->getUrl('*/*/update') ?>" method="post">
        <table cellspacing="0" width="100%" class="shopping-cart product-data" id="wishlist-table">
        <thead>
            <tr>
                <th class="align-left"><?php echo $this->__('Product') ?></th>
                <th class="align-center"><?php echo $this->__('Comment') ?></th>
                <th class="align-center">&nbsp;</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach($this->getWishlistItems() as $item): ?>
            <tr>
                <td>
                    <div>
                        <a href="<?php echo $this->getProductUrl($item) ?>">
                            <img src="<?php echo $this->helper('catalog/image')->init($item, 'small_image')->resize(113); ?>" alt="<?php echo $this->htmlEscape($item->getName()) ?>" width="113" />
                        </a>
                    </div>
                    <div><a href="<?php echo $this->getProductUrl($item) ?>" title="<?php echo $this->htmlEscape($item->getName()) ?>"><?php echo $this->htmlEscape($item->getName()) ?></a></div>
                    <?php echo $this->helper('catalog/product')->getPriceHtml($item) ?>
                </td>
                <td class="align-center"><?php echo $this->getEscapedDescription($item) ?></td>
                <td class="align-center">
                    <?php if ($item->isSaleable()): ?>
                    <a href="#" onclick="setLocation('<?php echo $this->getAddToCartUrl($item) ?>');return false;" class="link-cart"><?php echo $this->__('Add to Cart') ?></a><br/>
                    <?php endif;?>
                    <a href="#" onclick="setLocation('<?php echo $this->getAddToWishlistUrl($item) ?>');return false;" class="link-cart"><?php echo $this->__('Add to Wishlist') ?></a>
                </td>
            </tr>
            <?php endforeach ?>
        </tbody>
        </table>
        <script type="text/javascript">decorateTable('wishlist-table')</script>
        <?php if($this->isSaleable()):?>
        <div class="button-set">
            <button onclick="setLocation('<?php echo $this->getUrl('*/*/allcart', array('_current'=>true)) ?>')" class="form-button-alt"  type="button"><span><?php echo $this->__('Add All to Cart') ?></span></button>&nbsp;
        </div>
        <?php endif;?>
    </form>
    <?php else: ?>
        <p><?php echo $this->__('Wishlist is empty now.') ?></p>
    <?php endif ?>
</div>
