[ 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\Text; 16 use Joomla\CMS\Layout\LayoutHelper; 17 use Joomla\CMS\Router\Route; 18 19 $user = Factory::getUser(); 20 $userId = $user->get('id'); 21 $listOrder = $this->escape($this->state->get('list.ordering')); 22 $listDirn = $this->escape($this->state->get('list.direction')); 23 24 Text::script('COM_FINDER_INDEX_CONFIRM_DELETE_PROMPT'); 25 26 /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ 27 $wa = $this->document->getWebAssetManager(); 28 $wa->useScript('com_finder.filters') 29 ->useScript('table.columns') 30 ->useScript('multiselect'); 31 32 ?> 33 <form action="<?php echo Route::_('index.php?option=com_finder&view=filters'); ?>" method="post" name="adminForm" id="adminForm"> 34 <div class="row"> 35 <div class="col-md-12"> 36 <div id="j-main-container" class="j-main-container"> 37 <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> 38 <?php if (empty($this->items)) : ?> 39 <div class="alert alert-info"> 40 <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span> 41 <?php echo Text::_('COM_FINDER_NO_RESULTS_OR_FILTERS'); ?> 42 </div> 43 <?php else : ?> 44 <table class="table"> 45 <caption class="visually-hidden"> 46 <?php echo Text::_('COM_FINDER_FILTERS_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 <td class="w-1 text-center"> 53 <?php echo HTMLHelper::_('grid.checkall'); ?> 54 </td> 55 <th scope="col" class="w-1 text-center"> 56 <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $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', 'COM_FINDER_HEADING_CREATED_BY', 'a.created_by_alias', $listDirn, $listOrder); ?> 63 </th> 64 <th scope="col" class="w-10 d-none d-md-table-cell"> 65 <?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_HEADING_CREATED_ON', 'a.created', $listDirn, $listOrder); ?> 66 </th> 67 <th scope="col" class="w-5 d-none d-md-table-cell"> 68 <?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_HEADING_MAP_COUNT', 'a.map_count', $listDirn, $listOrder); ?> 69 </th> 70 <th scope="col" class="w-1 d-none d-md-table-cell"> 71 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.filter_id', $listDirn, $listOrder); ?> 72 </th> 73 </tr> 74 </thead> 75 <tbody> 76 <?php 77 $canCreate = $user->authorise('core.create', 'com_finder'); 78 $canEdit = $user->authorise('core.edit', 'com_finder'); 79 $userAuthoriseCoreManage = $user->authorise('core.manage', 'com_checkin'); 80 $userAuthoriseCoreEditState = $user->authorise('core.edit.state', 'com_finder'); 81 $userId = $user->id; 82 foreach ($this->items as $i => $item) : 83 $canCheckIn = $userAuthoriseCoreManage || $item->checked_out == $userId || is_null($item->checked_out); 84 $canChange = $userAuthoriseCoreEditState && $canCheckIn; 85 $escapedTitle = $this->escape($item->title); 86 ?> 87 <tr class="row<?php echo $i % 2; ?>"> 88 <td class="text-center"> 89 <?php echo HTMLHelper::_('grid.id', $i, $item->filter_id, false, 'cid', 'cb', $item->title); ?> 90 </td> 91 <td class="text-center"> 92 <?php echo HTMLHelper::_('jgrid.published', $item->state, $i, 'filters.', $canChange); ?> 93 </td> 94 <th scope="row"> 95 <?php if ($item->checked_out) : ?> 96 <?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'filters.', $canCheckIn); ?> 97 <?php endif; ?> 98 <?php if ($canEdit) : ?> 99 <a href="<?php echo Route::_('index.php?option=com_finder&task=filter.edit&filter_id=' . (int) $item->filter_id); ?>"> 100 <?php echo $escapedTitle; ?></a> 101 <?php else : ?> 102 <?php echo $escapedTitle; ?> 103 <?php endif; ?> 104 </th> 105 <td class="d-none d-md-table-cell"> 106 <?php echo $item->created_by_alias ?: $item->user_name; ?> 107 </td> 108 <td class="d-none d-md-table-cell"> 109 <?php echo HTMLHelper::_('date', $item->created, Text::_('DATE_FORMAT_LC4')); ?> 110 </td> 111 <td class="d-none d-md-table-cell"> 112 <?php echo $item->map_count; ?> 113 </td> 114 <td class="d-none d-md-table-cell"> 115 <?php echo (int) $item->filter_id; ?> 116 </td> 117 </tr> 118 <?php endforeach; ?> 119 </tbody> 120 </table> 121 122 <?php // load the pagination. ?> 123 <?php echo $this->pagination->getListFooter(); ?> 124 125 <?php endif; ?> 126 <input type="hidden" name="task" value=""> 127 <input type="hidden" name="boxchecked" value="0"> 128 <?php echo HTMLHelper::_('form.token'); ?> 129 </div> 130 </div> 131 </div> 132 </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 |