[ 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_categories 6 * 7 * @copyright (C) 2013 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\Multilanguage; 16 use Joomla\CMS\Language\Text; 17 use Joomla\CMS\Layout\LayoutHelper; 18 use Joomla\CMS\Router\Route; 19 use Joomla\CMS\Session\Session; 20 use Joomla\Component\Content\Site\Helper\RouteHelper; 21 22 $app = Factory::getApplication(); 23 24 if ($app->isClient('site')) { 25 Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); 26 } 27 28 HTMLHelper::_('behavior.core'); 29 30 $extension = $this->escape($this->state->get('filter.extension')); 31 $function = $app->input->getCmd('function', 'jSelectCategory'); 32 $listOrder = $this->escape($this->state->get('list.ordering')); 33 $listDirn = $this->escape($this->state->get('list.direction')); 34 ?> 35 <div class="container-popup"> 36 37 <form action="<?php echo Route::_('index.php?option=com_categories&view=categories&layout=modal&tmpl=component&function=' . $function . '&' . Session::getFormToken() . '=1'); ?>" method="post" name="adminForm" id="adminForm"> 38 39 <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> 40 41 <?php if (empty($this->items)) : ?> 42 <div class="alert alert-info"> 43 <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span> 44 <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> 45 </div> 46 <?php else : ?> 47 <table class="table" id="categoryList"> 48 <caption class="visually-hidden"> 49 <?php echo Text::_('COM_CATEGORIES_TABLE_CAPTION'); ?>, 50 <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>, 51 <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span> 52 </caption> 53 <thead> 54 <tr> 55 <th scope="col" class="w-1 text-center"> 56 <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?> 57 </th> 58 <th scope="col"> 59 <?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> 60 </th> 61 <th scope="col" class="w-10 d-none d-md-table-cell"> 62 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?> 63 </th> 64 <th scope="col" class="w-15 d-none d-md-table-cell"> 65 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn, $listOrder); ?> 66 </th> 67 <th scope="col" class="w-1 d-none d-md-table-cell"> 68 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> 69 </th> 70 </tr> 71 </thead> 72 <tbody> 73 <?php 74 $iconStates = array( 75 -2 => 'icon-trash', 76 0 => 'icon-times', 77 1 => 'icon-check', 78 2 => 'icon-folder', 79 ); 80 ?> 81 <?php foreach ($this->items as $i => $item) : ?> 82 <?php if ($item->language && Multilanguage::isEnabled()) { 83 $tag = strlen($item->language); 84 if ($tag == 5) { 85 $lang = substr($item->language, 0, 2); 86 } elseif ($tag == 6) { 87 $lang = substr($item->language, 0, 3); 88 } else { 89 $lang = ''; 90 } 91 } elseif (!Multilanguage::isEnabled()) { 92 $lang = ''; 93 } 94 ?> 95 <tr class="row<?php echo $i % 2; ?>"> 96 <td class="text-center"> 97 <span class="tbody-icon"> 98 <span class="<?php echo $iconStates[$this->escape($item->published)]; ?>" aria-hidden="true"></span> 99 </span> 100 </td> 101 <th scope="row"> 102 <?php echo LayoutHelper::render('joomla.html.treeprefix', array('level' => $item->level)); ?> 103 <a href="javascript:void(0)" onclick="if (window.parent) window.parent.<?php echo $this->escape($function); ?>('<?php echo $item->id; ?>', '<?php echo $this->escape(addslashes($item->title)); ?>', null, '<?php echo $this->escape(RouteHelper::getCategoryRoute($item->id, $item->language)); ?>', '<?php echo $this->escape($lang); ?>', null);"> 104 <?php echo $this->escape($item->title); ?></a> 105 <div class="small" title="<?php echo $this->escape($item->path); ?>"> 106 <?php if (empty($item->note)) : ?> 107 <?php echo Text::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias)); ?> 108 <?php else : ?> 109 <?php echo Text::sprintf('JGLOBAL_LIST_ALIAS_NOTE', $this->escape($item->alias), $this->escape($item->note)); ?> 110 <?php endif; ?> 111 </div> 112 </th> 113 <td class="small d-none d-md-table-cell"> 114 <?php echo $this->escape($item->access_level); ?> 115 </td> 116 <td class="small d-none d-md-table-cell"> 117 <?php echo LayoutHelper::render('joomla.content.language', $item); ?> 118 </td> 119 <td class="d-none d-md-table-cell"> 120 <?php echo (int) $item->id; ?> 121 </td> 122 </tr> 123 <?php endforeach; ?> 124 </tbody> 125 </table> 126 127 <?php // load the pagination. ?> 128 <?php echo $this->pagination->getListFooter(); ?> 129 130 <?php endif; ?> 131 132 <input type="hidden" name="extension" value="<?php echo $extension; ?>"> 133 <input type="hidden" name="task" value=""> 134 <input type="hidden" name="boxchecked" value="0"> 135 <input type="hidden" name="forcedLanguage" value="<?php echo $app->input->get('forcedLanguage', '', 'CMD'); ?>"> 136 <?php echo HTMLHelper::_('form.token'); ?> 137 138 </form> 139 </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 |