* @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Categories\Categories; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; 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; use Joomla\Component\Fields\Administrator\Helper\FieldsHelper; /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->document->getWebAssetManager(); $wa->useScript('table.columns') ->useScript('multiselect'); $app = Factory::getApplication(); $user = Factory::getUser(); $userId = $user->get('id'); $context = $this->escape($this->state->get('filter.context')); $component = $this->state->get('filter.component'); $section = $this->state->get('filter.section'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $ordering = ($listOrder == 'a.ordering'); $saveOrder = ($listOrder == 'a.ordering' && strtolower($listDirn) == 'asc'); // The category object of the component $category = Categories::getInstance(str_replace('com_', '', $component) . '.' . $section); // If there is no category for the component and section, then check the component only if (!$category) { $category = Categories::getInstance(str_replace('com_', '', $component)); } if ($saveOrder && !empty($this->items)) { $saveOrderingUrl = 'index.php?option=com_fields&task=fields.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1'; HTMLHelper::_('draggablelist.draggable'); } $searchToolsOptions = []; // Only show field contexts filter if there are more than one option if (count($this->filterForm->getField('context')->options) > 1) { $searchToolsOptions['selectorFieldName'] = 'context'; } ?>
$this, 'options' => $searchToolsOptions)); ?> items)) : ?>
class="js-draggable" data-url="" data-direction="" data-nested="true"> items as $i => $item) : ?> authorise('core.edit', $component . '.field.' . $item->id); ?> authorise('core.admin', 'com_checkin') || $item->checked_out == $userId || is_null($item->checked_out); ?> authorise('core.edit.own', $component . '.field.' . $item->id) && $item->created_user_id == $userId; ?> authorise('core.edit.state', $component . '.field.' . $item->id) && $canCheckin; ?>
, ,
id, false, 'cid', 'cb', $item->title); ?> state, $i, 'fields.', $canChange, 'cb'); ?>
checked_out) : ?> editor, $item->checked_out_time, 'fields.', $canCheckin); ?> escape($item->title); ?> escape($item->title); ?>
note)) : ?> escape($item->name)); ?> escape($item->name), $this->escape($item->note)); ?>
only_use_in_subform) : ?>
id); ?> id); ?>
escape($item->type); ?> escape($item->group_title); ?> escape($item->access_level); ?> id; ?>
pagination->getListFooter(); ?> authorise('core.create', $component) && $user->authorise('core.edit', $component) && $user->authorise('core.edit.state', $component) ) : ?> Text::_('COM_FIELDS_VIEW_FIELDS_BATCH_OPTIONS'), 'footer' => $this->loadTemplate('batch_footer') ), $this->loadTemplate('batch_body') ); ?>