<?php
/**
 * Maho
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://magento.com)
 * @copyright   Copyright (c) 2021-2024 The OpenMage Contributors (https://openmage.org)
 * @copyright   Copyright (c) 2024 Maho (https://mahocommerce.com)
 * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/** @var Mage_CatalogSearch_Block_Result $this */
?>
<?php if($this->getResultCount()): ?>
<?= $this->getMessagesBlock()->toHtml() ?>
<div class="page-title">
    <?php if ($this->helper('rss/catalog')->getTagFeedUrl()): ?>
        <a href="<?= $this->helper('rss/catalog')->getTagFeedUrl() ?>" class="nobr link-rss"><?= $this->__('Subscribe to Feed') ?></a>
    <?php endif ?>
    <h1><?= ($this->getHeaderText() || $this->getHeaderText() === false) ? $this->getHeaderText() : $this->__("Search results for '%s'", $this->helper('catalogsearch')->getEscapedQueryText()) ?></h1>
</div>
    <?php if ($messages = $this->getNoteMessages()):?>
    <p class="note-msg">
        <?php foreach ($messages as $message):?>
            <?= $message ?><br />
        <?php endforeach ?>
    </p>
    <?php endif ?>
    <?= $this->getProductListHtml() ?>
<?php else: ?>
<div class="page-title">
    <h1><?= ($this->getHeaderText() || $this->getHeaderText() === false) ? $this->getHeaderText() : $this->__("Search results for '%s'", $this->helper('catalogsearch')->getEscapedQueryText()) ?></h1>
</div>
<p class="note-msg">
    <?= ($this->getNoResultText()) ? $this->getNoResultText() : $this->__('Your search returns no results.') ?>
    <?php if ($messages = $this->getNoteMessages()):?>
        <?php foreach ($messages as $message):?>
        <br /><?= $message ?>
        <?php endforeach ?>
    <?php endif ?>
</p>
<?php endif ?>
