<?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)
 */
?>

<h2><?php echo $this->__('Wishlist') ?></h2>
<?php if($wishlist->getSize()): ?>
<form action="<?php echo $this->getUrl('customer/wishlist/updatePost') ?>" method="post">
    <table cellspacing="0" width="100%" class="data-table">
        <tr>
            <th class="align-left"><?php echo $this->__('Product') ?></th>
            <th style="width:60px;" class="align-center"><?php echo $this->__('Status') ?></th>
            <th style="width:60px;" class="align-center"><?php echo $this->__('To Cart') ?></th>
            <th style="width:60px;" class="align-center"><?php echo $this->__('Remove') ?></th>
        </tr>
        <?php foreach($wishlist as $item): ?>
        <tr>
            <td>
                <input type="hidden" value="1" name="wishlist[<?php echo $item->getItemId() ?>]" />
                <a href="<?php echo $this->getUrl('catalog/product/view/id/'.$item->getProduct()->getId()) ?>"><?php echo $this->htmlEscape($item->getProduct()->getName()) ?></a>
            </td>
            <td class="align-center"><?php echo $item->getStatus() ?></td>
            <td class="align-center"><input type="checkbox" value="1" name="to_cart[<?php echo $item->getItemId() ?>]" /></td>
            <td class="align-center"><input type="checkbox" value="1" name="remove[<?php echo $item->getItemId() ?>]" /></td>
        </tr>
        <?php endforeach ?>
    </table>
    <div class="buttons-container">
        <a href="<?php echo Mage::getBaseUrl() ?>" class="float-left">&laquo; <?php echo $this->__('Continue Shopping') ?></a>
        <input type="submit" value="<?php echo $this->__('Update') ?>" class="input-button" name="do" />
    </div>
</form>
<?php else: ?>
    <p><?php echo $this->__('You have placed no products yet.') ?></p>
    <div class="button-set">
        <a href="<?php echo $this->getUrl('customer/account') ?>" class="left">&laquo; Back - link to the previously viewed page</a>
    </div>
<?php endif ?>
