[ 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_finder 6 * 7 * @copyright (C) 2011 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\Component\Finder\Administrator\Helper\LanguageHelper; 20 21 $listOrder = $this->escape($this->state->get('list.ordering')); 22 $listDirn = $this->escape($this->state->get('list.direction')); 23 $lang = Factory::getLanguage(); 24 $branchFilter = $this->escape($this->state->get('filter.branch')); 25 26 Text::script('COM_FINDER_MAPS_CONFIRM_DELETE_PROMPT'); 27 28 /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ 29 $wa = $this->document->getWebAssetManager(); 30 $wa->useScript('com_finder.maps') 31 ->useScript('table.columns') 32 ->useScript('multiselect'); 33 34 ?> 35 <form action="<?php echo Route::_('index.php?option=com_finder&view=maps'); ?>" method="post" name="adminForm" id="adminForm"> 36 <div class="row"> 37 <div class="col-md-12"> 38 <div id="j-main-container" class="j-main-container"> 39 <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> 40 <?php if (empty($this->items)) : ?> 41 <div class="alert alert-info"> 42 <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span> 43 <?php echo Text::_('COM_FINDER_MAPS_NO_CONTENT'); ?> 44 </div> 45 <?php else : ?> 46 <table class="table"> 47 <caption class="visually-hidden"> 48 <?php echo Text::_('COM_FINDER_MAPS_TABLE_CAPTION'); ?>, 49 <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>, 50 <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span> 51 </caption> 52 <thead> 53 <tr> 54 <td class="w-1 text-center"> 55 <?php echo HTMLHelper::_('grid.checkall'); ?> 56 </td> 57 <th scope="col" class="w-1 text-center"> 58 <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?> 59 </th> 60 <th scope="col"> 61 <?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'branch_title, a.lft', $listDirn, $listOrder); ?> 62 </th> 63 <?php if (!$branchFilter) : ?> 64 <th scope="col" class="w-1 text-center"> 65 <?php echo Text::_('COM_FINDER_HEADING_CHILDREN'); ?> 66 </th> 67 <?php endif; ?> 68 <th scope="col" class="w-1 text-center"> 69 <span class="icon-check" aria-hidden="true"></span> 70 <span class="d-none d-md-inline"><?php echo Text::_('COM_FINDER_MAPS_COUNT_PUBLISHED_ITEMS'); ?></span> 71 </th> 72 <th scope="col" class="w-1 text-center"> 73 <span class="icon-times" aria-hidden="true"></span> 74 <span class="d-none d-md-inline"><?php echo Text::_('COM_FINDER_MAPS_COUNT_UNPUBLISHED_ITEMS'); ?></span> 75 </th> 76 <?php if (Multilanguage::isEnabled()) : ?> 77 <th scope="col" class="w-10 nowrap d-none d-md-table-cell"> 78 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?> 79 </th> 80 <?php endif; ?> 81 </tr> 82 </thead> 83 <tbody> 84 <?php $canChange = Factory::getApplication()->getIdentity()->authorise('core.manage', 'com_finder'); ?> 85 <?php foreach ($this->items as $i => $item) : ?> 86 <tr class="row<?php echo $i % 2; ?>"> 87 <td class="text-center"> 88 <?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->title); ?> 89 </td> 90 <td class="text-center"> 91 <?php echo HTMLHelper::_('jgrid.published', $item->state, $i, 'maps.', $canChange, 'cb'); ?> 92 </td> 93 <th scope="row"> 94 <?php 95 if (trim($item->branch_title, '*') === 'Language') { 96 $title = LanguageHelper::branchLanguageTitle($item->title); 97 } else { 98 $key = LanguageHelper::branchSingular($item->title); 99 $title = $lang->hasKey($key) ? Text::_($key) : $item->title; 100 } 101 ?> 102 <?php echo str_repeat('<span class="gi">—</span>', $item->level - 1); ?> 103 <?php echo $this->escape($title); ?> 104 <?php if ($this->escape(trim($title, '*')) === 'Language' && Multilanguage::isEnabled()) : ?> 105 <div class="small"> 106 <strong><?php echo Text::_('COM_FINDER_MAPS_MULTILANG'); ?></strong> 107 </div> 108 <?php endif; ?> 109 </th> 110 <?php if (!$branchFilter) : ?> 111 <td class="text-center btns itemnumber"> 112 <?php if ($item->rgt - $item->lft > 1) : ?> 113 <a href="<?php echo Route::_('index.php?option=com_finder&view=maps&filter[branch]=' . $item->id); ?>" 114 aria-describedby="tip-map<?php echo $i; ?>"> 115 <span class="btn btn-info"><?php echo floor(($item->rgt - $item->lft) / 2); ?></span> 116 </a> 117 <div role="tooltip" id="tip-map<?php echo $i; ?>"> 118 <?php echo Text::_('COM_FINDER_HEADING_CHILDREN'); ?> 119 </div> 120 <?php else : ?> 121 - 122 <?php endif; ?> 123 </td> 124 <?php endif; ?> 125 <td class="text-center btns itemnumber"> 126 <?php if ($item->level > 1) : ?> 127 <a class="btn <?php echo ((int) $item->count_published > 0) ? 'btn-success' : 'btn-secondary'; ?>" 128 href="<?php echo Route::_('index.php?option=com_finder&view=index&filter[state]=1&filter[content_map]=' . $item->id); ?>" 129 aria-describedby="tip-publish<?php echo $i; ?>"> 130 <?php echo (int) $item->count_published; ?> 131 </a> 132 <div role="tooltip" id="tip-publish<?php echo $i; ?>"> 133 <?php echo Text::_('COM_FINDER_MAPS_COUNT_PUBLISHED_ITEMS'); ?> 134 </div> 135 <?php else : ?> 136 - 137 <?php endif; ?> 138 </td> 139 <td class="text-center btns itemnumber"> 140 <?php if ($item->level > 1) : ?> 141 <a class="btn <?php echo ((int) $item->count_unpublished > 0) ? 'btn-danger' : 'btn-secondary'; ?>" 142 href="<?php echo Route::_('index.php?option=com_finder&view=index&filter[state]=0&filter[content_map]=' . $item->id); ?>" 143 aria-describedby="tip-unpublish<?php echo $i; ?>"> 144 <?php echo (int) $item->count_unpublished; ?> 145 </a> 146 <div role="tooltip" id="tip-unpublish<?php echo $i; ?>"> 147 <?php echo Text::_('COM_FINDER_MAPS_COUNT_UNPUBLISHED_ITEMS'); ?> 148 </div> 149 <?php else : ?> 150 - 151 <?php endif; ?> 152 </td> 153 <?php if (Multilanguage::isEnabled()) : ?> 154 <td class="small d-none d-md-table-cell"> 155 <?php echo $item->language; ?> 156 </td> 157 <?php endif; ?> 158 </tr> 159 <?php endforeach; ?> 160 </tbody> 161 </table> 162 163 <?php // load the pagination. ?> 164 <?php echo $this->pagination->getListFooter(); ?> 165 166 <?php endif; ?> 167 </div> 168 169 <input type="hidden" name="task" value="display"> 170 <input type="hidden" name="boxchecked" value="0"> 171 <?php echo HTMLHelper::_('form.token'); ?> 172 </div> 173 </div> 174 </form>
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 |