[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 5 * @subpackage com_modules 6 * 7 * @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 defined('_JEXEC') or die; 12 13 use Joomla\CMS\Factory; 14 use Joomla\CMS\HTML\HTMLHelper; 15 use Joomla\CMS\Language\Text; 16 use Joomla\CMS\Layout\LayoutHelper; 17 use Joomla\CMS\Router\Route; 18 use Joomla\CMS\Session\Session; 19 20 if (Factory::getApplication()->isClient('site')) { 21 Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); 22 } 23 24 /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ 25 $wa = $this->document->getWebAssetManager(); 26 $wa->useScript('com_modules.admin-modules-modal'); 27 28 $listOrder = $this->escape($this->state->get('list.ordering')); 29 $listDirn = $this->escape($this->state->get('list.direction')); 30 $editor = Factory::getApplication()->input->get('editor', '', 'cmd'); 31 $link = 'index.php?option=com_modules&view=modules&layout=modal&tmpl=component&' . Session::getFormToken() . '=1'; 32 33 if (!empty($editor)) { 34 $link .= '&editor=' . $editor; 35 } 36 ?> 37 <div class="container-popup"> 38 39 <form action="<?php echo Route::_($link); ?>" method="post" name="adminForm" id="adminForm"> 40 41 <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> 42 43 <?php if ($this->total > 0) : ?> 44 <table class="table" id="moduleList"> 45 <caption class="visually-hidden"> 46 <?php echo Text::_('COM_MODULES_TABLE_CAPTION'); ?>, 47 <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>, 48 <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span> 49 </caption> 50 <thead> 51 <tr> 52 <th scope="col" class="w-1 text-center"> 53 <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?> 54 </th> 55 <th scope="col" class="title"> 56 <?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> 57 </th> 58 <th scope="col" class="w-15 d-none d-md-table-cell"> 59 <?php echo HTMLHelper::_('searchtools.sort', 'COM_MODULES_HEADING_POSITION', 'a.position', $listDirn, $listOrder); ?> 60 </th> 61 <th scope="col" class="w-10 d-none d-md-table-cell"> 62 <?php echo HTMLHelper::_('searchtools.sort', 'COM_MODULES_HEADING_MODULE', 'name', $listDirn, $listOrder); ?> 63 </th> 64 <th scope="col" class="w-10 d-none d-md-table-cell"> 65 <?php echo HTMLHelper::_('searchtools.sort', 'COM_MODULES_HEADING_PAGES', 'pages', $listDirn, $listOrder); ?> 66 </th> 67 <th scope="col" class="w-10 d-none d-md-table-cell"> 68 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'ag.title', $listDirn, $listOrder); ?> 69 </th> 70 <th scope="col" class="w-10 d-none d-md-table-cell"> 71 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'l.title', $listDirn, $listOrder); ?> 72 </th> 73 <th scope="col" class="w-1 d-none d-md-table-cell"> 74 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> 75 </th> 76 </tr> 77 </thead> 78 <tbody> 79 <?php 80 $iconStates = array( 81 -2 => 'icon-trash', 82 0 => 'icon-times', 83 1 => 'icon-check', 84 2 => 'icon-folder', 85 ); 86 foreach ($this->items as $i => $item) : 87 ?> 88 <tr class="row<?php echo $i % 2; ?>"> 89 <td class="text-center"> 90 <span class="tbody-icon"> 91 <span class="<?php echo $iconStates[$this->escape($item->published)]; ?>" aria-hidden="true"></span> 92 </span> 93 </td> 94 <th scope="row" class="has-context"> 95 <a class="js-module-insert btn btn-sm btn-success w-100" href="#" data-module="<?php echo $item->id; ?>" data-editor="<?php echo $this->escape($editor); ?>"> 96 <?php echo $this->escape($item->title); ?> 97 </a> 98 </th> 99 <td class="small d-none d-md-table-cell"> 100 <?php if ($item->position) : ?> 101 <a class="js-position-insert btn btn-sm btn-warning w-100" href="#" data-position="<?php echo $this->escape($item->position); ?>" data-editor="<?php echo $this->escape($editor); ?>"><?php echo $this->escape($item->position); ?></a> 102 <?php else : ?> 103 <span class="btn btn-sm btn-secondary w-100"><?php echo Text::_('JNONE'); ?></span> 104 <?php endif; ?> 105 </td> 106 <td class="small d-none d-md-table-cell"> 107 <?php echo $item->name; ?> 108 </td> 109 <td class="small d-none d-md-table-cell"> 110 <?php echo $item->pages; ?> 111 </td> 112 <td class="small d-none d-md-table-cell"> 113 <?php echo $this->escape($item->access_level); ?> 114 </td> 115 <td class="small d-none d-md-table-cell"> 116 <?php echo LayoutHelper::render('joomla.content.language', $item); ?> 117 </td> 118 <td class="d-none d-md-table-cell"> 119 <?php echo (int) $item->id; ?> 120 </td> 121 </tr> 122 <?php endforeach; ?> 123 </tbody> 124 </table> 125 126 <?php // load the pagination. ?> 127 <?php echo $this->pagination->getListFooter(); ?> 128 129 <?php endif; ?> 130 131 <input type="hidden" name="task" value=""> 132 <input type="hidden" name="boxchecked" value="0"> 133 <input type="hidden" name="editor" value="<?php echo $editor; ?>" /> 134 <?php echo HTMLHelper::_('form.token'); ?> 135 136 </form> 137 </div>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |