* @license GNU General Public License version 2 or later; see LICENSE.txt */ // Restrict direct access defined('_JEXEC') or die; use Joomla\CMS\Application\CMSWebApplicationInterface; use Joomla\CMS\Factory; 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\Component\Scheduler\Administrator\Task\Status; use Joomla\Component\Scheduler\Administrator\View\Tasks\HtmlView; /** @var HtmlView $this*/ /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->document->getWebAssetManager(); $wa->useScript('table.columns') ->useScript('multiselect') ->useScript('com_scheduler.test-task') ->useStyle('com_scheduler.admin-view-tasks-css'); Text::script('COM_SCHEDULER_TEST_RUN_TITLE'); Text::script('COM_SCHEDULER_TEST_RUN_TASK'); Text::script('COM_SCHEDULER_TEST_RUN_DURATION'); Text::script('COM_SCHEDULER_TEST_RUN_OUTPUT'); Text::script('COM_SCHEDULER_TEST_RUN_STATUS_STARTED'); Text::script('COM_SCHEDULER_TEST_RUN_STATUS_COMPLETED'); Text::script('COM_SCHEDULER_TEST_RUN_STATUS_TERMINATED'); Text::script('JLIB_JS_AJAX_ERROR_OTHER'); Text::script('JLIB_JS_AJAX_ERROR_CONNECTION_ABORT'); Text::script('JLIB_JS_AJAX_ERROR_TIMEOUT'); Text::script('JLIB_JS_AJAX_ERROR_NO_CONTENT'); Text::script('JLIB_JS_AJAX_ERROR_PARSE'); try { /** @var CMSWebApplicationInterface $app */ $app = Factory::getApplication(); } catch (Exception $e) { die('Failed to get app'); } $user = $app->getIdentity(); $userId = $user->get('id'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $saveOrder = $listOrder == 'a.ordering'; $section = null; $mode = false; if ($saveOrder && !empty($this->items)) { $saveOrderingUrl = 'index.php?option=com_scheduler&task=tasks.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1'; HTMLHelper::_('draggablelist.draggable'); } $this->document->addScriptOptions('com_scheduler.test-task.token', Session::getFormToken()); ?>