[ 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\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 /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ 20 $wa = $this->document->getWebAssetManager(); 21 $wa->useScript('multiselect'); 22 23 $input = Factory::getApplication()->input; 24 $field = $input->getCmd('field'); 25 $listOrder = $this->escape($this->state->get('list.ordering')); 26 $listDirn = $this->escape($this->state->get('list.direction')); 27 $enabledStates = array(0 => 'icon-check', 1 => 'icon-times'); 28 $activatedStates = array(0 => 'icon-check', 1 => 'icon-times'); 29 $userRequired = (int) $input->get('required', 0, 'int'); 30 $onClick = "window.parent.jSelectUser(this);window.parent.Joomla.Modal.getCurrent().close()"; 31 32 ?> 33 <div class="container-popup"> 34 <form action="<?php echo Route::_('index.php?option=com_users&view=users&layout=modal&tmpl=component&groups=' . $input->get('groups', '', 'BASE64') . '&excluded=' . $input->get('excluded', '', 'BASE64')); ?>" method="post" name="adminForm" id="adminForm"> 35 <?php if (!$userRequired) : ?> 36 <div> 37 <button type="button" class="btn btn-primary button-select" data-user-value="0" data-user-name="<?php echo $this->escape(Text::_('JLIB_FORM_SELECT_USER')); ?>" 38 data-user-field="<?php echo $this->escape($field); ?>"><?php echo Text::_('JOPTION_NO_USER'); ?></button> 39 </div> 40 <?php endif; ?> 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 table-sm"> 49 <caption class="visually-hidden"> 50 <?php echo Text::_('COM_USERS_USERS_TABLE_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 <th scope="col"> 57 <?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_NAME', 'a.name', $listDirn, $listOrder); ?> 58 </th> 59 <th scope="col" class="w-25"> 60 <?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_USERNAME', 'a.username', $listDirn, $listOrder); ?> 61 </th> 62 <th scope="col" class="w-1 text-center"> 63 <?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_ENABLED', 'a.block', $listDirn, $listOrder); ?> 64 </th> 65 <th scope="col" class="w-1 text-center"> 66 <?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_ACTIVATED', 'a.activation', $listDirn, $listOrder); ?> 67 </th> 68 <th scope="col" class="w-25"> 69 <?php echo Text::_('COM_USERS_HEADING_GROUPS'); ?> 70 </th> 71 <th scope="col" class="w-1"> 72 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> 73 </th> 74 </tr> 75 </thead> 76 <tbody> 77 <?php $i = 0; ?> 78 <?php foreach ($this->items as $item) : ?> 79 <tr class="row<?php echo $i % 2; ?>"> 80 <th scope="row"> 81 <a class="pointer button-select" href="#" data-user-value="<?php echo $item->id; ?>" data-user-name="<?php echo $this->escape($item->name); ?>" 82 data-user-field="<?php echo $this->escape($field); ?>"> 83 <?php echo $this->escape($item->name); ?> 84 </a> 85 </th> 86 <td> 87 <?php echo $this->escape($item->username); ?> 88 </td> 89 <td class="text-center"> 90 <span class="tbody-icon"> 91 <span class="<?php echo $enabledStates[(int) $this->escape($item->block)]; ?>"></span> 92 </span> 93 </td> 94 <td class="text-center"> 95 <span class="tbody-icon"> 96 <span class="<?php echo $activatedStates[(empty($item->activation) ? 0 : 1)]; ?>"></span> 97 </span> 98 </td> 99 <td> 100 <?php echo nl2br($item->group_names, false); ?> 101 </td> 102 <td> 103 <?php echo (int) $item->id; ?> 104 </td> 105 </tr> 106 <?php endforeach; ?> 107 </tbody> 108 </table> 109 110 <?php // load the pagination. ?> 111 <?php echo $this->pagination->getListFooter(); ?> 112 113 <?php endif; ?> 114 <input type="hidden" name="task" value=""> 115 <input type="hidden" name="field" value="<?php echo $this->escape($field); ?>"> 116 <input type="hidden" name="boxchecked" value="0"> 117 <input type="hidden" name="required" value="<?php echo $userRequired; ?>"> 118 <?php echo HTMLHelper::_('form.token'); ?> 119 </form> 120 </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 |