<?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     default_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
 * @copyright   Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org)
 * @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
 */
?>
<?php
$_width  = $this->getImagesWidth();
$_height = $this->getImagesHeight();
?>
<?php if ($this->getFilesCount() > 0): ?>
    <?php foreach ($this->getFiles() as $file): ?>
    <div class="filecnt" id="<?php echo $this->getFileId($file) ?>">
        <p class="nm" style="height:<?php echo $_height ?>px;width:<?php echo $_width ?>px;">
        <?php if($this->getFileThumbUrl($file)):?>
            <img src="<?php echo $this->getFileThumbUrl($file) ?>" alt="<?php echo $this->escapeHtml($this->getFileName($file)) ?>"/>
        <?php endif ?>
        </p>
        <?php if($this->getFileWidth($file)): ?>
            <small><?php echo $this->getFileWidth($file) ?>x<?php echo $this->getFileHeight($file) ?> <?php echo $this->helper('cms')->__('px.') ?></small><br/>
        <?php endif ?>
        <small><?php echo $this->getFileShortName($file); ?></small>
    </div>
    <?php endforeach ?>
<?php else: ?>
    <?php echo $this->helper('cms')->__('No files found') ?>
<?php endif ?>
