* @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Associations; use Joomla\CMS\Language\Multilanguage; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; use Joomla\CMS\Session\Session; /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->document->getWebAssetManager(); $wa->useScript('table.columns') ->useScript('multiselect'); $user = Factory::getUser(); $app = Factory::getApplication(); $userId = $user->get('id'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $ordering = ($listOrder == 'a.lft'); $saveOrder = ($listOrder == 'a.lft' && strtolower($listDirn) == 'asc'); $menuType = (string) $app->getUserState('com_menus.items.menutype', ''); if ($saveOrder && $menuType && !empty($this->items)) { $saveOrderingUrl = 'index.php?option=com_menus&task=items.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1'; HTMLHelper::_('draggablelist.draggable'); } $assoc = Associations::isEnabled() && $this->state->get('filter.client_id') == 0; ?>
$this, 'options' => array('selectorFieldName' => 'menutype'))); ?> items)) : ?> state->get('filter.client_id') == 0) : ?> state->get('filter.client_id') == 0) : ?> state->get('filter.client_id') == 0) && (Multilanguage::isEnabled())) : ?> class="js-draggable" data-url="" data-direction="" data-nested="false"> items as $i => $item) : $orderkey = array_search($item->id, $this->ordering[$item->parent_id]); $canCreate = $user->authorise('core.create', 'com_menus.menu.' . $item->menutype_id); $canEdit = $user->authorise('core.edit', 'com_menus.menu.' . $item->menutype_id); $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->get('id') || is_null($item->checked_out); $canChange = $user->authorise('core.edit.state', 'com_menus.menu.' . $item->menutype_id) && $canCheckin; // Get the parents of item for sorting if ($item->level > 1) { $parentsStr = ''; $_currentParentId = $item->parent_id; $parentsStr = ' ' . $_currentParentId; for ($j = 0; $j < $item->level; $j++) { foreach ($this->ordering as $k => $v) { $v = implode('-', $v); $v = '-' . $v . '-'; if (strpos($v, '-' . $_currentParentId . '-') !== false) { $parentsStr .= ' ' . $k; $_currentParentId = $k; break; } } } } else { $parentsStr = ''; } ?> state->get('filter.client_id') == 0) : ?> state->get('filter.client_id') == 0) : ?> state->get('filter.client_id') == 0 && Multilanguage::isEnabled()) : ?> pagination->getListFooter(); ?> authorise('core.create', 'com_menus') || $user->authorise('core.edit', 'com_menus')) : ?> Text::_('COM_MENUS_BATCH_OPTIONS'), 'footer' => $this->loadTemplate('batch_footer') ), $this->loadTemplate('batch_body') ); ?>