[ 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_privacy 6 * 7 * @copyright (C) 2018 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\Date\Date; 14 use Joomla\CMS\Factory; 15 use Joomla\CMS\HTML\HTMLHelper; 16 use Joomla\CMS\Language\Text; 17 use Joomla\CMS\Layout\LayoutHelper; 18 use Joomla\CMS\Router\Route; 19 20 /** @var \Joomla\Component\Privacy\Administrator\View\Consents\HtmlView $this */ 21 22 /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */ 23 $wa = $this->document->getWebAssetManager(); 24 $wa->useScript('table.columns') 25 ->useScript('multiselect'); 26 27 $user = Factory::getUser(); 28 $listOrder = $this->escape($this->state->get('list.ordering')); 29 $listDirn = $this->escape($this->state->get('list.direction')); 30 $now = Factory::getDate(); 31 $stateIcons = array(-1 => 'delete', 0 => 'archive', 1 => 'publish'); 32 $stateMsgs = array( 33 -1 => Text::_('COM_PRIVACY_CONSENTS_STATE_INVALIDATED'), 34 0 => Text::_('COM_PRIVACY_CONSENTS_STATE_OBSOLETE'), 35 1 => Text::_('COM_PRIVACY_CONSENTS_STATE_VALID') 36 ); 37 38 ?> 39 <form action="<?php echo Route::_('index.php?option=com_privacy&view=consents'); ?>" method="post" name="adminForm" id="adminForm"> 40 <div id="j-main-container"> 41 <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> 42 <?php if (empty($this->items)) : ?> 43 <div class="alert alert-info"> 44 <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span> 45 <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> 46 </div> 47 <?php else : ?> 48 <table class="table" id="consentList"> 49 <caption class="visually-hidden"> 50 <?php echo Text::_('COM_PRIVACY_TABLE_CONSENTS_CAPTION'); ?>, 51 <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>, 52 <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span> 53 </caption> 54 <thead> 55 <tr> 56 <td class="w-1 text-center"> 57 <?php echo HTMLHelper::_('grid.checkall'); ?> 58 </td> 59 <th scope="col" class="w-5 text-center"> 60 <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?> 61 </th> 62 <th scope="col" class="w-10"> 63 <?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_USERNAME', 'u.username', $listDirn, $listOrder); ?> 64 </th> 65 <th scope="col" class="w-10"> 66 <?php echo HTMLHelper::_('searchtools.sort', 'COM_PRIVACY_HEADING_NAME', 'u.name', $listDirn, $listOrder); ?> 67 </th> 68 <th scope="col" class="w-1"> 69 <?php echo HTMLHelper::_('searchtools.sort', 'COM_PRIVACY_HEADING_USERID', 'a.user_id', $listDirn, $listOrder); ?> 70 </th> 71 <th scope="col" class="w-10"> 72 <?php echo HTMLHelper::_('searchtools.sort', 'COM_PRIVACY_HEADING_CONSENTS_SUBJECT', 'a.subject', $listDirn, $listOrder); ?> 73 </th> 74 <th scope="col"> 75 <?php echo Text::_('COM_PRIVACY_HEADING_CONSENTS_BODY'); ?> 76 </th> 77 <th scope="col" class="w-15"> 78 <?php echo HTMLHelper::_('searchtools.sort', 'COM_PRIVACY_HEADING_CONSENTS_CREATED', 'a.created', $listDirn, $listOrder); ?> 79 </th> 80 <th scope="col" class="w-1"> 81 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> 82 </th> 83 </tr> 84 </thead> 85 <tbody> 86 <?php foreach ($this->items as $i => $item) : ?> 87 <tr> 88 <td class="text-center"> 89 <?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->username); ?> 90 </td> 91 <td class="tbody-icon"> 92 <span class="icon-<?php echo $stateIcons[$item->state]; ?>" aria-hidden="true" title="<?php echo $stateMsgs[$item->state]; ?>"></span> 93 <span class="visually-hidden"><?php echo $stateMsgs[$item->state]; ?>"></span> 94 </td> 95 <th scope="row"> 96 <?php echo $item->username; ?> 97 </th> 98 <td> 99 <?php echo $item->name; ?> 100 </td> 101 <td> 102 <?php echo $item->user_id; ?> 103 </td> 104 <td> 105 <?php echo Text::_($item->subject); ?> 106 </td> 107 <td> 108 <?php echo $item->body; ?> 109 </td> 110 <td class="break-word"> 111 <?php echo HTMLHelper::_('date.relative', new Date($item->created), null, $now); ?> 112 <div class="small"> 113 <?php echo HTMLHelper::_('date', $item->created, Text::_('DATE_FORMAT_LC6')); ?> 114 </div> 115 </td> 116 <td> 117 <?php echo (int) $item->id; ?> 118 </td> 119 </tr> 120 <?php endforeach; ?> 121 </tbody> 122 </table> 123 <?php endif; ?> 124 125 <input type="hidden" name="task" value="" /> 126 <input type="hidden" name="boxchecked" value="0" /> 127 <?php echo HTMLHelper::_('form.token'); ?> 128 </div> 129 </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 |