<?php
/**
 * OpenMage
 *
 * 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 at https://opensource.org/license/afl-3-0-php
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
 * @copyright   Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
 * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/**
 * @deprecated  after 1.4.0.0-alpha3
 */
?>
<div class="page-title">
    <h1><?php echo $this->__('Wishlist') ?></h1>
</div>
<?php if($wishlist->getSize()): ?>
<form action="<?php echo $this->getUrl('customer/wishlist/updatePost') ?>" method="post">
    <table class="data-table">
        <col />
        <col width="60" />
        <col width="60" />
        <col width="60" />
        <thead>
            <tr>
                <th><?php echo $this->__('Product') ?></th>
                <th><?php echo $this->__('Status') ?></th>
                <th><?php echo $this->__('To Cart') ?></th>
                <th><?php echo $this->__('Remove') ?></th>
            </tr>
        </thead>
        <tbody>
        <?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->escapeHtml($item->getProduct()->getName()) ?></a>
                </td>
                <td><?php echo $item->getStatus() ?></td>
                <td><input type="checkbox" value="1" name="to_cart[<?php echo $item->getItemId() ?>]" class="checkbox" /></td>
                <td><input type="checkbox" value="1" name="remove[<?php echo $item->getItemId() ?>]" class="checkbox" /></td>
            </tr>
        <?php endforeach ?>
        </tbody>
    </table>
    <div class="buttons-set">
        <a href="<?php echo Mage::getBaseUrl() ?>">&laquo; <?php echo $this->__('Continue Shopping') ?></a>
        <input type="submit" value="<?php echo Mage::helper('core')->quoteEscape($this->__('Update')) ?>" class="input-button" name="do" />
    </div>
</form>
<?php else: ?>
    <p><?php echo $this->__('You have placed no products yet.') ?></p>
    <div class="buttons-set">
        <p class="back-link"><a href="<?php echo $this->getUrl('customer/account') ?>"><small>&laquo; </small><?php echo $this->__('Back - link to the previously viewed page') ?></a></p>
    </div>
<?php endif ?>
