* @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; use Joomla\CMS\Session\Session; use Joomla\CMS\Uri\Uri; /** @var \Joomla\Component\Menus\Administrator\View\Menus\HtmlView $this */ /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->getDocument()->getWebAssetManager(); $wa->useScript('table.columns') ->useScript('multiselect') ->useScript('com_menus.admin-menus') ->useScript('joomla.dialog-autocreate'); $uri = Uri::getInstance(); $return = base64_encode($uri); $user = $this->getCurrentUser(); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $modMenuId = (int) $this->get('ModMenuId'); $itemIds = []; foreach ($this->items as $item) { if ($user->authorise('core.edit', 'com_menus')) { $itemIds[] = $item->id; } } $saveOrder = $listOrder == 'a.ordering'; if ($saveOrder) { $saveOrderingUrl = 'index.php?option=com_menus&task=menus.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1'; HTMLHelper::_('draggablelist.draggable'); } $this->getDocument()->addScriptOptions('menus-default', ['items' => $itemIds]); // Set up the modal options that will be used for module editor $popupOptionsEdit = [ 'popupType' => 'iframe', 'textHeader' => Text::_('COM_MENUS_EDIT_MODULE_SETTINGS'), ]; $popupOptionsAdd = [ 'popupType' => 'iframe', 'textHeader' => Text::_('COM_MENUS_ADD_MENU_MODULE'), ]; ?>
$this, 'options' => ['filterButton' => false]]); ?> items)) : ?>
class="js-draggable" data-url="" data-direction="" data-nested="false"> items as $i => $item) : $ordering = ($listOrder == 'a.ordering'); $canEdit = $user->authorise('core.edit', 'com_menus.menu.' . (int) $item->id); $canManageItems = $user->authorise('core.manage', 'com_menus.menu.' . (int) $item->id); $canChange = $user->authorise('core.edit.state', 'com_menus.menu.' . (int) $item->id); ?> pagination->getListFooter(); ?>