<?php
/**
 * Maho
 *
 * @category    design
 * @package     default_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)
 */
?>
<?php
/**
 * Directory contents template for Wysiwyg Images
 *
 * @see Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content_Files
 * @var Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content_Files $this
 */
?>
<?php
$_width  = $this->getImagesWidth();
$_height = $this->getImagesHeight();
?>
<?php if ($this->getFilesCount() > 0): ?>
    <?php foreach ($this->getFiles() as $file): ?>
    <div class="filecnt" id="<?= $this->getFileId($file) ?>">
        <p class="nm" style="height:<?= $_height ?>px;width:<?= $_width ?>px;">
        <?php if($this->getFileThumbUrl($file)):?>
            <img src="<?= $this->getFileThumbUrl($file) ?>" alt="<?= $this->escapeHtml($this->getFileName($file)) ?>"/>
        <?php endif ?>
        </p>
        <?php if($this->getFileWidth($file)): ?>
            <small><?= $this->getFileWidth($file) ?>x<?= $this->getFileHeight($file) ?> <?= $this->helper('cms')->__('px.') ?></small><br/>
        <?php endif ?>
        <small><?= $this->getFileShortName($file) ?></small>
    </div>
    <?php endforeach ?>
<?php else: ?>
    <?= $this->helper('cms')->__('No files found') ?>
<?php endif ?>
