| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/dansnotreville-fr/nice/layouts/joomla/toolbar/ |
Upload File : |
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
extract($displayData, EXTR_OVERWRITE);
/**
* Layout variables
* -----------------
* @var string $id
* @var string $onclick
* @var string $class
* @var string $text
* @var string $btnClass
* @var string $tagName
* @var string $htmlAttributes
* @var string $hasButtons
* @var string $button
* @var string $dropdownItems
* @var string $caretClass
* @var string $toggleSplit
*/
$direction = Factory::getLanguage()->isRtl() ? 'dropdown-menu-end' : '';
/**
* The dropdown class is also injected on the button from \Joomla\CMS\Toolbar\ToolbarButton::prepareOptions() and therefore we need the dropdown script whether we
* are in split toggle mode or not
*/
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
$wa->useScript('bootstrap.dropdown');
?>
<?php if ($hasButtons && trim($button) !== '') : ?>
<?php // If there is a toggle split then render the items. Else render the parent button which has the items in the custom element. ?>
<?php if ($toggleSplit ?? true) : ?>
<?php // @todo use a class instead of the inline style.
// Reverse order solves a console err for dropdown ?>
<div id="<?php echo $id; ?>" class="btn-group dropdown-<?php echo $name ?? ''; ?>" role="group">
<button type="button" class="<?php echo $caretClass ?? ''; ?> dropdown-toggle-split"
data-bs-toggle="dropdown" data-bs-target=".dropdown-menu" data-bs-display="static" aria-haspopup="true" aria-expanded="false">
<span class="visually-hidden"><?php echo Text::_('JGLOBAL_TOGGLE_DROPDOWN'); ?></span>
<span class="icon-chevron-down" aria-hidden="true"></span>
</button>
<?php echo $button; ?>
<?php if (trim($dropdownItems) !== '') : ?>
<div class="dropdown-menu <?php echo $direction; ?>">
<?php echo $dropdownItems; ?>
</div>
<?php endif; ?>
</div>
<?php else : ?>
<?php echo $button; ?>
<?php endif; ?>
<?php endif; ?>