/administrator/templates/hathor/html/com_users/users/default.php
PHP | 202 lines | 177 code | 15 blank | 10 comment | 15 complexity | c93730861b0bc2e6e84266a69ff460fe MD5 | raw file
Possible License(s): LGPL-2.1
1<?php 2/** 3 * @package Joomla.Administrator 4 * @subpackage Template.hathor 5 * 6 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. 7 * @license GNU General Public License version 2 or later; see LICENSE.txt 8 */ 9 10defined('_JEXEC') or die; 11 12// Include the component HTML helpers. 13JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); 14 15// Load the tooltip behavior. 16JHtml::_('behavior.tooltip'); 17JHtml::_('behavior.multiselect'); 18JHtml::_('behavior.modal'); 19 20$canDo = UsersHelper::getActions(); 21$listOrder = $this->escape($this->state->get('list.ordering')); 22$listDirn = $this->escape($this->state->get('list.direction')); 23$loggeduser = JFactory::getUser(); 24?> 25 26<form action="<?php echo JRoute::_('index.php?option=com_users&view=users');?>" method="post" name="adminForm" id="adminForm"> 27 <fieldset id="filter-bar"> 28 <legend class="element-invisible"><?php echo JText::_('COM_USERS_SEARCH_USERS'); ?></legend> 29 <div class="filter-search"> 30 <label class="filter-search-lbl" for="filter_search"><?php echo JText::_('COM_USERS_SEARCH_USERS'); ?></label> 31 <input type="text" name="filter_search" id="filter_search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" title="<?php echo JText::_('COM_USERS_SEARCH_USERS'); ?>" /> 32 <button type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button> 33 <button type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_RESET'); ?></button> 34 </div> 35 36 <div class="filter-select"> 37 <span class="faux-label")><?php echo JText::_('COM_USERS_FILTER_LABEL'); ?></span> 38 39 <label class="selectlabel" for="filter_state"> 40 <?php echo JText::_('COM_USERS_FILTER_LABEL'); ?> 41 </label> 42 <select name="filter_state" class="inputbox" id="filter_state"> 43 <option value="*"><?php echo JText::_('COM_USERS_FILTER_STATE');?></option> 44 <?php echo JHtml::_('select.options', UsersHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state'));?> 45 </select> 46 47 <label class="selectlabel" for="filter_active"> 48 <?php echo JText::_('COM_USERS_FILTER_ACTIVE'); ?> 49 </label> 50 <select name="filter_active" class="inputbox" id="filter_active"> 51 <option value="*"><?php echo JText::_('COM_USERS_FILTER_ACTIVE');?></option> 52 <?php echo JHtml::_('select.options', UsersHelper::getActiveOptions(), 'value', 'text', $this->state->get('filter.active'));?> 53 </select> 54 55 <label class="selectlabel" for="filter_group_id"> 56 <?php echo JText::_('COM_USERS_FILTER_USERGROUP'); ?> 57 </label> 58 <select name="filter_group_id" class="inputbox" id="filter_group_id"> 59 <option value=""><?php echo JText::_('COM_USERS_FILTER_USERGROUP');?></option> 60 <?php echo JHtml::_('select.options', UsersHelper::getGroups(), 'value', 'text', $this->state->get('filter.group_id'));?> 61 </select> 62 63 <label class="selectlabel" for="filter_range"> 64 <?php echo JText::_('COM_USERS_FILTER_FILTER_DATE'); ?> 65 </label> 66 <select name="filter_range" class="inputbox" id="filter_range" > 67 <option value=""><?php echo JText::_('COM_USERS_OPTION_FILTER_DATE');?></option> 68 <?php echo JHtml::_('select.options', Usershelper::getRangeOptions(), 'value', 'text', $this->state->get('filter.range'));?> 69 </select> 70 71 <button type="submit" id="filter-go"> 72 <?php echo JText::_('JSUBMIT'); ?></button> 73 </div> 74 </fieldset> 75 <div class="clr"> </div> 76 77 <table class="adminlist"> 78 <thead> 79 <tr> 80 <th class="checkmark-col"> 81 <input type="checkbox" name="checkall-toggle" value="" title="<?php echo JText::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /> 82 </th> 83 <th class="title"> 84 <?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_NAME', 'a.name', $listDirn, $listOrder); ?> 85 </th> 86 <th class="nowrap width-10"> 87 <?php echo JHtml::_('grid.sort', 'JGLOBAL_USERNAME', 'a.username', $listDirn, $listOrder); ?> 88 </th> 89 <th class="nowrap width-5"> 90 <?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_ENABLED', 'a.block', $listDirn, $listOrder); ?> 91 </th> 92 <th class="nowrap width-5"> 93 <?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_ACTIVATED', 'a.activation', $listDirn, $listOrder); ?> 94 </th> 95 <th class="nowrap width-10"> 96 <?php echo JText::_('COM_USERS_HEADING_GROUPS'); ?> 97 </th> 98 <th class="nowrap width-15"> 99 <?php echo JHtml::_('grid.sort', 'JGLOBAL_EMAIL', 'a.email', $listDirn, $listOrder); ?> 100 </th> 101 <th class="nowrap width-15"> 102 <?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_LAST_VISIT_DATE', 'a.lastvisitDate', $listDirn, $listOrder); ?> 103 </th> 104 <th class="nowrap width-15"> 105 <?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_REGISTRATION_DATE', 'a.registerDate', $listDirn, $listOrder); ?> 106 </th> 107 <th class="nowrap id-col"> 108 <?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> 109 </th> 110 </tr> 111 </thead> 112 113 <tbody> 114 <?php foreach ($this->items as $i => $item) : 115 $canEdit = $canDo->get('core.edit'); 116 $canChange = $loggeduser->authorise('core.edit.state', 'com_users'); 117 // If this group is super admin and this user is not super admin, $canEdit is false 118 if ((!$loggeduser->authorise('core.admin')) && JAccess::check($item->id, 'core.admin')) { 119 $canEdit = false; 120 $canChange = false; 121 } 122 ?> 123 <tr class="row<?php echo $i % 2; ?>"> 124 <td> 125 <?php if ($canEdit) : ?> 126 <?php echo JHtml::_('grid.id', $i, $item->id); ?> 127 <?php endif; ?> 128 </td> 129 <td> 130 <div class="fltrt"> 131 <?php echo JHtml::_('users.filterNotes', $item->note_count, $item->id); ?> 132 <?php echo JHtml::_('users.notes', $item->note_count, $item->id); ?> 133 <?php echo JHtml::_('users.addNote', $item->id); ?> 134 </div> 135 <?php if ($canEdit) : ?> 136 <a href="<?php echo JRoute::_('index.php?option=com_users&task=user.edit&id='.(int) $item->id); ?>" title="<?php echo JText::sprintf('COM_USERS_EDIT_USER', $this->escape($item->name)); ?>"> 137 <?php echo $this->escape($item->name); ?></a> 138 <?php else : ?> 139 <?php echo $this->escape($item->name); ?> 140 <?php endif; ?> 141 <?php if (JDEBUG) : ?> 142 <div class="fltrt"><div class="button2-left smallsub"><div class="blank"><a href="<?php echo JRoute::_('index.php?option=com_users&view=debuguser&user_id='.(int) $item->id);?>"> 143 <?php echo JText::_('COM_USERS_DEBUG_USER');?></a></div></div></div> 144 <?php endif; ?> 145 </td> 146 <td class="center"> 147 <?php echo $this->escape($item->username); ?> 148 </td> 149 <td class="center"> 150 <?php if ($canChange) : ?> 151 <?php if ($loggeduser->id != $item->id) : ?> 152 <?php echo JHtml::_('grid.boolean', $i, !$item->block, 'users.unblock', 'users.block'); ?> 153 <?php else : ?> 154 <?php echo JHtml::_('grid.boolean', $i, !$item->block, 'users.block', null); ?> 155 <?php endif; ?> 156 <?php else : ?> 157 <?php echo JText::_($item->block ? 'JNO' : 'JYES'); ?> 158 <?php endif; ?> 159 </td> 160 <td class="center"> 161 <?php echo JHtml::_('grid.boolean', $i, !$item->activation, 'users.activate', null); ?> 162 </td> 163 <td class="center"> 164 <?php if (substr_count($item->group_names, "\n") > 1) : ?> 165 <span class="hasTip" title="<?php echo JText::_('COM_USERS_HEADING_GROUPS').'::'.nl2br($item->group_names); ?>"><?php echo JText::_('COM_USERS_USERS_MULTIPLE_GROUPS'); ?></span> 166 <?php else : ?> 167 <?php echo nl2br($item->group_names); ?> 168 <?php endif; ?> 169 </td> 170 <td class="center"> 171 <?php echo $this->escape($item->email); ?> 172 </td> 173 <td class="center"> 174 <?php if ($item->lastvisitDate != '0000-00-00 00:00:00'): ?> 175 <?php echo JHtml::_('date', $item->lastvisitDate, 'Y-m-d H:i:s'); ?> 176 <?php else:?> 177 <?php echo JText::_('JNEVER'); ?> 178 <?php endif;?> 179 </td> 180 <td class="center"> 181 <?php echo JHtml::_('date', $item->registerDate, 'Y-m-d H:i:s'); ?> 182 </td> 183 <td class="center"> 184 <?php echo (int) $item->id; ?> 185 </td> 186 </tr> 187 <?php endforeach; ?> 188 </tbody> 189 </table> 190 191 <?php //Load the batch processing form. ?> 192 <?php echo $this->loadTemplate('batch'); ?> 193 194 <?php echo $this->pagination->getListFooter(); ?> 195 <div> 196 <input type="hidden" name="task" value="" /> 197 <input type="hidden" name="boxchecked" value="0" /> 198 <input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" /> 199 <input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" /> 200 <?php echo JHtml::_('form.token'); ?> 201 </div> 202</form>