* @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->getDocument()->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'); Text::script('JCLOSE'); try { /** @var CMSWebApplicationInterface $app */ $app = Factory::getApplication(); } catch (Exception $e) { die('Failed to get app'); } $user = $app->getIdentity(); $userId = $user->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'); } // When there are due Tasks show that information to the user if ($this->hasDueTasks === true) { $app->enqueueMessage(Text::_('COM_SCHEDULER_MSG_DUETASKS'), 'warning'); } ?>