[ 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_users 6 * 7 * @copyright (C) 2009 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\Access\Access; 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 $user = Factory::getUser(); 21 $listOrder = $this->escape($this->state->get('list.ordering')); 22 $listDirn = $this->escape($this->state->get('list.direction')); 23 24 Text::script('COM_USERS_GROUPS_CONFIRM_DELETE', true); 25 26 /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ 27 $wa = $this->document->getWebAssetManager(); 28 $wa->useScript('com_users.admin-users-groups') 29 ->useScript('multiselect') 30 ->useScript('table.columns'); 31 32 ?> 33 <form action="<?php echo Route::_('index.php?option=com_users&view=groups'); ?>" 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, 'options' => array('filterButton' => false))); ?> 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::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> 42 </div> 43 <?php else : ?> 44 <table class="table" id="groupList"> 45 <caption class="visually-hidden"> 46 <?php echo Text::_('COM_USERS_GROUPS_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"> 56 <?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_GROUP_TITLE', 'a.title', $listDirn, $listOrder); ?> 57 </th> 58 <th scope="col" class="w-10 text-center"> 59 <?php echo Text::_('COM_USERS_DEBUG_PERMISSIONS'); ?> 60 </th> 61 <th scope="col" class="w-10 text-center d-none d-md-table-cell"> 62 <span class="icon-check" aria-hidden="true"></span> 63 <?php echo Text::_('COM_USERS_COUNT_ENABLED_USERS'); ?> 64 </th> 65 <th scope="col" class="w-10 text-center d-none d-md-table-cell"> 66 <span class="icon-times" aria-hidden="true"></span> 67 <?php echo Text::_('COM_USERS_COUNT_DISABLED_USERS'); ?> 68 </th> 69 <th scope="col" class="w-5 d-none d-md-table-cell"> 70 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> 71 </th> 72 </tr> 73 </thead> 74 <tbody> 75 <?php foreach ($this->items as $i => $item) : 76 $canCreate = $user->authorise('core.create', 'com_users'); 77 $canEdit = $user->authorise('core.edit', 'com_users'); 78 79 // If this group is super admin and this user is not super admin, $canEdit is false 80 if (!$user->authorise('core.admin') && Access::checkGroup($item->id, 'core.admin')) { 81 $canEdit = false; 82 } 83 $canChange = $user->authorise('core.edit.state', 'com_users'); 84 ?> 85 <tr class="row<?php echo $i % 2; ?>"> 86 <td class="text-center" data-usercount="<?php echo $item->user_count; ?>"> 87 <?php if ($canEdit) : ?> 88 <?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->title); ?> 89 <?php endif; ?> 90 </td> 91 <th scope="row"> 92 <?php echo LayoutHelper::render('joomla.html.treeprefix', array('level' => $item->level + 1)); ?> 93 <?php if ($canEdit) : ?> 94 <a href="<?php echo Route::_('index.php?option=com_users&task=group.edit&id=' . $item->id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape($item->title); ?>"> 95 <?php echo $this->escape($item->title); ?></a> 96 <?php else : ?> 97 <?php echo $this->escape($item->title); ?> 98 <?php endif; ?> 99 </th> 100 <td class="text-center btns"> 101 <a href="<?php echo Route::_('index.php?option=com_users&view=debuggroup&group_id=' . (int) $item->id); ?>"> 102 <span class="icon-list" aria-hidden="true"></span> 103 <span class="visually-hidden"><?php echo Text::_('COM_USERS_DEBUG_PERMISSIONS'); ?></span> 104 </a> 105 </td> 106 <td class="text-center btns itemnumber d-none d-md-table-cell"> 107 <a class="btn <?php echo $item->count_enabled > 0 ? 'btn-success' : 'btn-secondary'; ?>" 108 href="<?php echo Route::_('index.php?option=com_users&view=users&filter[group_id]=' . (int) $item->id . '&filter[state]=0'); ?>" 109 aria-describedby="tip-enabled<?php echo $i; ?>"> 110 <?php echo $item->count_enabled; ?> 111 </a> 112 <div role="tooltip" id="tip-enabled<?php echo $i; ?>"> 113 <?php echo Text::_('COM_USERS_COUNT_ENABLED_USERS'); ?> 114 </div> 115 </td> 116 <td class="text-center btns itemnumber d-none d-md-table-cell"> 117 <a class="btn <?php echo $item->count_disabled > 0 ? 'btn-danger' : 'btn-secondary'; ?>" 118 href="<?php echo Route::_('index.php?option=com_users&view=users&filter[group_id]=' . (int) $item->id . '&filter[state]=1'); ?>" 119 aria-describedby="tip-blocked<?php echo $i; ?>"> 120 <?php echo $item->count_disabled; ?> 121 </a> 122 <div role="tooltip" id="tip-blocked<?php echo $i; ?>"> 123 <?php echo Text::_('COM_USERS_COUNT_DISABLED_USERS'); ?> 124 </div> 125 </td> 126 <td class="d-none d-md-table-cell"> 127 <?php echo (int) $item->id; ?> 128 </td> 129 </tr> 130 <?php endforeach; ?> 131 </tbody> 132 </table> 133 134 <?php // load the pagination. ?> 135 <?php echo $this->pagination->getListFooter(); ?> 136 137 <?php endif; ?> 138 139 <input type="hidden" name="task" value=""> 140 <input type="hidden" name="boxchecked" value="0"> 141 <?php echo HTMLHelper::_('form.token'); ?> 142 </div> 143 </div> 144 </div> 145 </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 |