CoreFiles by mySites.guru
status.php63 lines, 2,030 bytes, from Joomla_4.2.2-Stable-Full_Package.zip
Raw History Compare with 4.2.1
md5
048cf88f2701b60fd2eb807b4bcbf3c1
sha1
022fbf2463010c667c3de6536959e92e13057614
sha256
fe924dcb5a6c3fde3f665607b6ba7dc60a4782d30373b47667ca63685d602c3b
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  Templates.Atum
 *
 * @copyright   (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 *
 * Module chrome for rendering the module in a submenu
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\Language\Text;

$modulePosition = $displayData['modules'];

$renderer   = Factory::getDocument()->loadRenderer('module');
$modules    = ModuleHelper::getModules($modulePosition);
$moduleHtml = [];
$moduleCollapsedHtml = [];

foreach ($modules as $key => $mod) {
    $out = $renderer->render($mod);

    if ($out !== '') {
        if (strpos($out, 'data-bs-toggle="modal"') !== false) {
            $dom = new \DOMDocument();
            $dom->loadHTML($out);
            $els = $dom->getElementsByTagName('a');

            $moduleCollapsedHtml[] = $dom->saveHTML($els[0]); //$els[0]->nodeValue;
        } else {
            $moduleCollapsedHtml[] = $out;
        }

        $moduleHtml[] = $out;
    }
}
?>
<div class="header-items d-flex ms-auto">
    <?php
    foreach ($moduleHtml as $mod) {
        echo '<div class="header-item">' . $mod . '</div>';
    }
    ?>
    <div class="header-more d-none" id="header-more-items" >
        <button class="header-more-btn dropdown-toggle" type="button" title="<?php echo Text::_('TPL_ATUM_MORE_ELEMENTS'); ?>" data-bs-toggle="dropdown" aria-expanded="false">
            <div class="header-item-icon"><span class="icon-ellipsis-h" aria-hidden="true"></span></div>
            <div class="visually-hidden"><?php echo Text::_('TPL_ATUM_MORE_ELEMENTS'); ?></div>
        </button>
        <div class="header-dd-items dropdown-menu">
            <?php
            foreach ($moduleCollapsedHtml as $key => $mod) {
                echo '<div class="header-dd-item dropdown-item" data-item="' . $key . '">' . $mod . '</div>';
            }
            ?>
        </div>
    </div>
</div>

The same content is in 19 releases, Joomla 4.2.0-beta3 to 4.2.9. See them all, or every version of this file.