You've already forked joomla_test
first commit
This commit is contained in:
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,131 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Include the component HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
?>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_users&view=debuggroup&user_id='.(int) $this->state->get('filter.user_id'));?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if (!empty( $this->sidebar)) : ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
<div id="filter-bar" class="btn-toolbar">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_USERS_SEARCH_ASSETS'); ?>" />
|
||||
</div>
|
||||
<div class="btn-group pull-left">
|
||||
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
|
||||
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_RESET'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="left">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_ASSET_TITLE', 'a.title', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th class="left">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_ASSET_NAME', 'a.name', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<?php foreach ($this->actions as $key => $action) : ?>
|
||||
<th width="5%" class="nowrap center">
|
||||
<span class="hasTooltip" title="<?php echo JHtml::tooltipText($key, $action[1]); ?>"><?php echo JText::_($key); ?></span>
|
||||
</th>
|
||||
<?php endforeach; ?>
|
||||
<th width="5%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_LFT', 'a.lft', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="1%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="15">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr class="row1">
|
||||
<td colspan="15">
|
||||
<div>
|
||||
<?php echo JText::_('COM_USERS_DEBUG_LEGEND'); ?>
|
||||
<span class="btn disabled btn-micro btn-warning"><i class="icon-white icon-ban-circle"></i></span> <?php echo JText::_('COM_USERS_DEBUG_IMPLICIT_DENY');?>
|
||||
<span class="btn disabled btn-micro btn-success"><i class="icon-white icon-ok"></i></span> <?php echo JText::_('COM_USERS_DEBUG_EXPLICIT_ALLOW');?>
|
||||
<span class="btn disabled btn-micro btn-danger"><i class="icon-white icon-remove"></i></span> <?php echo JText::_('COM_USERS_DEBUG_EXPLICIT_DENY');?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php foreach ($this->items as $i => $item) : ?>
|
||||
<tr class="row0">
|
||||
<td>
|
||||
<?php echo $this->escape($item->title); ?>
|
||||
</td>
|
||||
<td class="nowrap">
|
||||
<?php echo str_repeat('<span class="gi">|—</span>', $item->level) ?>
|
||||
<?php echo $this->escape($item->name); ?>
|
||||
</td>
|
||||
<?php foreach ($this->actions as $action) : ?>
|
||||
<?php
|
||||
$name = $action[0];
|
||||
$check = $item->checks[$name];
|
||||
if ($check === true) :
|
||||
$class = 'icon-ok';
|
||||
$button = 'btn-success';
|
||||
elseif ($check === false) :
|
||||
$class = 'icon-remove';
|
||||
$button = 'btn-danger';
|
||||
elseif ($check === null) :
|
||||
$class = 'icon-ban-circle';
|
||||
$button = 'btn-warning';
|
||||
else :
|
||||
$class = '';
|
||||
$button = '';
|
||||
endif;
|
||||
?>
|
||||
<td class="center">
|
||||
<span class="btn disabled btn-micro <?php echo $button; ?>">
|
||||
<i class="icon-white <?php echo $class; ?>"></i>
|
||||
</span>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
<td class="center">
|
||||
<?php echo (int) $item->lft; ?>
|
||||
- <?php echo (int) $item->rgt; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo (int) $item->id; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* View class for a list of users.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
* @since 1.6
|
||||
*/
|
||||
class UsersViewDebuggroup extends JViewLegacy
|
||||
{
|
||||
protected $actions;
|
||||
|
||||
protected $items;
|
||||
|
||||
protected $pagination;
|
||||
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Access check.
|
||||
if (!JFactory::getUser()->authorise('core.manage', 'com_users') || !JFactory::getConfig()->get('debug'))
|
||||
{
|
||||
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
}
|
||||
|
||||
$this->actions = $this->get('DebugActions');
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->group = $this->get('Group');
|
||||
$this->levels = UsersHelperDebug::getLevelsOptions();
|
||||
$this->components = UsersHelperDebug::getComponents();
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JToolbarHelper::title(JText::sprintf('COM_USERS_VIEW_DEBUG_GROUP_TITLE', $this->group->id, $this->group->title), 'groups');
|
||||
|
||||
JToolbarHelper::help('JHELP_USERS_DEBUG_GROUPS');
|
||||
|
||||
JHtmlSidebar::setAction('index.php?option=com_users&view=debuggroup&user_id=' . (int) $this->state->get('filter.user_id'));
|
||||
|
||||
$option = '';
|
||||
if (!empty($this->components))
|
||||
{
|
||||
$option = JHtml::_('select.options', $this->components, 'value', 'text', $this->state->get('filter.component'));
|
||||
}
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('COM_USERS_OPTION_SELECT_COMPONENT'),
|
||||
'filter_component',
|
||||
$option
|
||||
);
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('COM_USERS_OPTION_SELECT_LEVEL_START'),
|
||||
'filter_level_start',
|
||||
JHtml::_('select.options', $this->levels, 'value', 'text', $this->state->get('filter.level_start'))
|
||||
);
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('COM_USERS_OPTION_SELECT_LEVEL_END'),
|
||||
'filter_level_end',
|
||||
JHtml::_('select.options', $this->levels, 'value', 'text', $this->state->get('filter.level_end'))
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,130 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Include the component HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
?>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_users&view=debuguser&user_id=' . (int) $this->state->get('filter.user_id'));?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if (!empty( $this->sidebar)) : ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
<div id="filter-bar" class="btn-toolbar">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_USERS_SEARCH_ASSETS'); ?>" />
|
||||
</div>
|
||||
<div class="btn-group pull-left">
|
||||
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
|
||||
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_RESET'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="left">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_ASSET_TITLE', 'a.title', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap left">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_ASSET_NAME', 'a.name', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<?php foreach ($this->actions as $key => $action) : ?>
|
||||
<th width="5%" class="nowrap center">
|
||||
<span class="hasTooltip" title="<?php echo JHtml::tooltipText($key, $action[1]); ?>"><?php echo JText::_($key); ?></span>
|
||||
</th>
|
||||
<?php endforeach; ?>
|
||||
<th width="5%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_LFT', 'a.lft', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="1%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="15">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr class="row1">
|
||||
<td colspan="15">
|
||||
<div>
|
||||
<?php echo JText::_('COM_USERS_DEBUG_LEGEND'); ?>
|
||||
<span class="btn disabled btn-micro btn-warning"><i class="icon-white icon-ban-circle"></i></span> <?php echo JText::_('COM_USERS_DEBUG_IMPLICIT_DENY');?>
|
||||
<span class="btn disabled btn-micro btn-success"><i class="icon-white icon-ok"></i></span> <?php echo JText::_('COM_USERS_DEBUG_EXPLICIT_ALLOW');?>
|
||||
<span class="btn disabled btn-micro btn-danger"><i class="icon-white icon-remove"></i></span> <?php echo JText::_('COM_USERS_DEBUG_EXPLICIT_DENY');?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php foreach ($this->items as $i => $item) : ?>
|
||||
<tr class="row0">
|
||||
<td>
|
||||
<?php echo $this->escape($item->title); ?>
|
||||
</td>
|
||||
<td class="nowrap">
|
||||
<?php echo str_repeat('<span class="gi">|—</span>', $item->level) ?>
|
||||
<?php echo $this->escape($item->name); ?>
|
||||
</td>
|
||||
<?php foreach ($this->actions as $action) : ?>
|
||||
<?php
|
||||
$name = $action[0];
|
||||
$check = $item->checks[$name];
|
||||
if ($check === true) :
|
||||
$class = 'icon-ok';
|
||||
$button = 'btn-success';
|
||||
elseif ($check === false) :
|
||||
$class = 'icon-remove';
|
||||
$button = 'btn-danger';
|
||||
elseif ($check === null) :
|
||||
$class = 'icon-ban-circle';
|
||||
$button = 'btn-warning';
|
||||
else :
|
||||
$class = '';
|
||||
$button = '';
|
||||
endif;
|
||||
?>
|
||||
<td class="center">
|
||||
<span class="btn disabled btn-micro <?php echo $button; ?>">
|
||||
<i class="icon-white <?php echo $class; ?>"></i>
|
||||
</span>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
<td class="center">
|
||||
<?php echo (int) $item->lft; ?>
|
||||
- <?php echo (int) $item->rgt; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo (int) $item->id; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* View class for a list of users.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
* @since 1.6
|
||||
*/
|
||||
class UsersViewDebuguser extends JViewLegacy
|
||||
{
|
||||
protected $actions;
|
||||
|
||||
protected $items;
|
||||
|
||||
protected $pagination;
|
||||
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Access check.
|
||||
if (!JFactory::getUser()->authorise('core.manage', 'com_users') || !JFactory::getConfig()->get('debug'))
|
||||
{
|
||||
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
}
|
||||
|
||||
$this->actions = $this->get('DebugActions');
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = $this->get('User');
|
||||
$this->levels = UsersHelperDebug::getLevelsOptions();
|
||||
$this->components = UsersHelperDebug::getComponents();
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JToolbarHelper::title(JText::sprintf('COM_USERS_VIEW_DEBUG_USER_TITLE', $this->user->id, $this->user->name), 'user');
|
||||
|
||||
JToolbarHelper::help('JHELP_USERS_DEBUG_USERS');
|
||||
|
||||
JHtmlSidebar::setAction('index.php?option=com_users&view=debuguser&user_id=' . (int) $this->state->get('filter.user_id'));
|
||||
|
||||
$option = '';
|
||||
if (!empty($this->components))
|
||||
{
|
||||
$option = JHtml::_('select.options', $this->components, 'value', 'text', $this->state->get('filter.component'));
|
||||
}
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('COM_USERS_OPTION_SELECT_COMPONENT'),
|
||||
'filter_component',
|
||||
$option
|
||||
);
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('COM_USERS_OPTION_SELECT_LEVEL_START'),
|
||||
'filter_level_start',
|
||||
JHtml::_('select.options', $this->levels, 'value', 'text', $this->state->get('filter.level_start'))
|
||||
);
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('COM_USERS_OPTION_SELECT_LEVEL_END'),
|
||||
'filter_level_end',
|
||||
JHtml::_('select.options', $this->levels, 'value', 'text', $this->state->get('filter.level_end'))
|
||||
);
|
||||
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
55
administrator/components/com_users/views/group/tmpl/edit.php
Normal file
55
administrator/components/com_users/views/group/tmpl/edit.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Include the component HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
$canDo = UsersHelper::getActions();
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == 'group.cancel' || document.formvalidator.isValid(document.id('group-form')))
|
||||
{
|
||||
Joomla.submitform(task, document.getElementById('group-form'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_users&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="group-form" class="form-validate form-horizontal">
|
||||
<fieldset>
|
||||
<legend><?php echo JText::_('COM_USERS_USERGROUP_DETAILS');?></legend>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('title'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('title'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<?php $parent_id = $this->form->getField('parent_id');?>
|
||||
<?php if (!$parent_id->hidden) : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $parent_id->label; ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="controls">
|
||||
<?php echo $parent_id->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
88
administrator/components/com_users/views/group/view.html.php
Normal file
88
administrator/components/com_users/views/group/view.html.php
Normal file
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* View to edit a user group.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
* @since 1.6
|
||||
*/
|
||||
class UsersViewGroup extends JViewLegacy
|
||||
{
|
||||
protected $form;
|
||||
|
||||
protected $item;
|
||||
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->state = $this->get('State');
|
||||
$this->item = $this->get('Item');
|
||||
$this->form = $this->get('Form');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JFactory::getApplication()->input->set('hidemainmenu', true);
|
||||
|
||||
$isNew = ($this->item->id == 0);
|
||||
$canDo = UsersHelper::getActions();
|
||||
|
||||
JToolbarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_GROUP_TITLE' : 'COM_USERS_VIEW_EDIT_GROUP_TITLE'), 'groups-add');
|
||||
|
||||
if ($canDo->get('core.edit') || $canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::apply('group.apply');
|
||||
JToolbarHelper::save('group.save');
|
||||
}
|
||||
if ($canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::save2new('group.save2new');
|
||||
}
|
||||
// If an existing item, can save to a copy.
|
||||
if (!$isNew && $canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::save2copy('group.save2copy');
|
||||
}
|
||||
|
||||
if (empty($this->item->id))
|
||||
{
|
||||
JToolbarHelper::cancel('group.cancel');
|
||||
}
|
||||
else
|
||||
{
|
||||
JToolbarHelper::cancel('group.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::help('JHELP_USERS_GROUPS_EDIT');
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
179
administrator/components/com_users/views/groups/tmpl/default.php
Normal file
179
administrator/components/com_users/views/groups/tmpl/default.php
Normal file
@ -0,0 +1,179 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Include the component HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$sortFields = $this->getSortFields();
|
||||
|
||||
JText::script('COM_USERS_GROUPS_CONFIRM_DELETE');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == 'groups.delete')
|
||||
{
|
||||
var f = document.adminForm;
|
||||
var cb='';
|
||||
<?php foreach ($this->items as $i => $item):?>
|
||||
<?php if ($item->user_count > 0):?>
|
||||
cb = f['cb'+<?php echo $i;?>];
|
||||
if (cb && cb.checked)
|
||||
{
|
||||
if (confirm(Joomla.JText._('COM_USERS_GROUPS_CONFIRM_DELETE')))
|
||||
{
|
||||
Joomla.submitform(task);
|
||||
}
|
||||
return;
|
||||
}
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
}
|
||||
Joomla.submitform(task);
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
Joomla.orderTable = function()
|
||||
{
|
||||
table = document.getElementById("sortTable");
|
||||
direction = document.getElementById("directionTable");
|
||||
order = table.options[table.selectedIndex].value;
|
||||
if (order != '<?php echo $listOrder; ?>')
|
||||
{
|
||||
dirn = 'asc';
|
||||
}
|
||||
else
|
||||
{
|
||||
dirn = direction.options[direction.selectedIndex].value;
|
||||
}
|
||||
Joomla.tableOrdering(order, dirn, '');
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_users&view=groups');?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if (!empty( $this->sidebar)) : ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
<div id="filter-bar" class="btn-toolbar">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_USERS_SEARCH_IN_GROUPS'); ?>" />
|
||||
</div>
|
||||
<div class="btn-group pull-left">
|
||||
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
|
||||
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC'); ?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC'); ?></label>
|
||||
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC'); ?></option>
|
||||
<option value="asc" <?php if ($listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING'); ?></option>
|
||||
<option value="desc" <?php if ($listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="btn-group pull-right">
|
||||
<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY'); ?></label>
|
||||
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JGLOBAL_SORT_BY');?></option>
|
||||
<?php echo JHtml::_('select.options', $sortFields, 'value', 'text', $listOrder); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%">
|
||||
<?php echo JHtml::_('grid.checkall'); ?>
|
||||
</th>
|
||||
<th class="left">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_GROUP_TITLE', 'a.title', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="20%" class="center">
|
||||
<?php echo JText::_('COM_USERS_HEADING_USERS_IN_GROUP'); ?>
|
||||
</th>
|
||||
<th width="1%">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php foreach ($this->items as $i => $item) :
|
||||
$canCreate = $user->authorise('core.create', 'com_users');
|
||||
$canEdit = $user->authorise('core.edit', 'com_users');
|
||||
|
||||
// If this group is super admin and this user is not super admin, $canEdit is false
|
||||
if (!$user->authorise('core.admin') && (JAccess::checkGroup($item->id, 'core.admin')))
|
||||
{
|
||||
$canEdit = false;
|
||||
}
|
||||
$canChange = $user->authorise('core.edit.state', 'com_users');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="center">
|
||||
<?php if ($canEdit) : ?>
|
||||
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo str_repeat('<span class="gi">|—</span>', $item->level) ?>
|
||||
<?php if ($canEdit) : ?>
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_users&task=group.edit&id='.$item->id);?>">
|
||||
<?php echo $this->escape($item->title); ?></a>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($item->title); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (JDEBUG) : ?>
|
||||
<div class="small"><a href="<?php echo JRoute::_('index.php?option=com_users&view=debuggroup&group_id='.(int) $item->id);?>">
|
||||
<?php echo JText::_('COM_USERS_DEBUG_GROUP');?></a></div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo $item->user_count ? $item->user_count : ''; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo (int) $item->id; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* View class for a list of user groups.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
* @since 1.6
|
||||
*/
|
||||
class UsersViewGroups extends JViewLegacy
|
||||
{
|
||||
protected $items;
|
||||
|
||||
protected $pagination;
|
||||
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
|
||||
UsersHelper::addSubmenu('groups');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
$canDo = UsersHelper::getActions();
|
||||
|
||||
JToolbarHelper::title(JText::_('COM_USERS_VIEW_GROUPS_TITLE'), 'groups');
|
||||
|
||||
if ($canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::addNew('group.add');
|
||||
}
|
||||
if ($canDo->get('core.edit'))
|
||||
{
|
||||
JToolbarHelper::editList('group.edit');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
if ($canDo->get('core.delete'))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'groups.delete');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
|
||||
if ($canDo->get('core.admin'))
|
||||
{
|
||||
JToolbarHelper::preferences('com_users');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
JToolbarHelper::help('JHELP_USERS_GROUPS');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of fields the table can be sorted by
|
||||
*
|
||||
* @return array Array containing the field name to sort by as the key and display text as value
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
protected function getSortFields()
|
||||
{
|
||||
return array(
|
||||
'a.title' => JText::_('COM_USERS_HEADING_GROUP_TITLE'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
1
administrator/components/com_users/views/index.html
Normal file
1
administrator/components/com_users/views/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
114
administrator/components/com_users/views/level/tmpl/edit.php
Normal file
114
administrator/components/com_users/views/level/tmpl/edit.php
Normal file
@ -0,0 +1,114 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Include the component HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('behavior.formvalidation');
|
||||
$canDo = UsersHelper::getActions();
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == 'level.cancel' || document.formvalidator.isValid(document.id('level-form')))
|
||||
{
|
||||
Joomla.submitform(task, document.id('level-form'));
|
||||
}
|
||||
}
|
||||
/*
|
||||
window.addEvent('domready', function(){
|
||||
document.id('user-groups').getElements('input').each(function(i){
|
||||
// Event to check all child groups.
|
||||
i.addEvent('check', function(e){
|
||||
// Check the child groups.
|
||||
document.id('user-groups').getElements('input').each(function(c){
|
||||
if (this.getProperty('rel') == c.id)
|
||||
{
|
||||
c.setProperty('checked', true);
|
||||
c.setProperty('disabled', true);
|
||||
c.fireEvent('check');
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(i));
|
||||
|
||||
// Event to uncheck all the parent groups.
|
||||
i.addEvent('uncheck', function(e){
|
||||
// Uncheck the parent groups.
|
||||
document.id('user-groups').getElements('input').each(function(c){
|
||||
if (c.getProperty('rel') == this.id)
|
||||
{
|
||||
c.setProperty('checked', false);
|
||||
c.setProperty('disabled', false);
|
||||
c.fireEvent('uncheck');
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(i));
|
||||
|
||||
// Bind to the click event to check/uncheck child/parent groups.
|
||||
i.addEvent('click', function(e){
|
||||
// Check the child groups.
|
||||
document.id('user-groups').getElements('input').each(function(c){
|
||||
if (this.getProperty('rel') == c.id)
|
||||
{
|
||||
c.setProperty('checked', true);
|
||||
if (this.getProperty('checked'))
|
||||
{
|
||||
c.setProperty('disabled', true);
|
||||
} else {
|
||||
c.setProperty('disabled', false);
|
||||
}
|
||||
c.fireEvent('check');
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
// Uncheck the parent groups.
|
||||
document.id('user-groups').getElements('input').each(function(c){
|
||||
if (c.getProperty('rel') == this.id)
|
||||
{
|
||||
c.setProperty('checked', false);
|
||||
c.setProperty('disabled', false);
|
||||
c.fireEvent('uncheck');
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(i));
|
||||
|
||||
// Initialise the widget.
|
||||
if (i.getProperty('checked'))
|
||||
{
|
||||
i.fireEvent('click');
|
||||
}
|
||||
});
|
||||
});
|
||||
*/
|
||||
</script>
|
||||
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_users&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="level-form" class="form-validate form-horizontal">
|
||||
<fieldset>
|
||||
<legend><?php echo JText::_('COM_USERS_LEVEL_DETAILS');?></legend>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('title'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('title'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo JText::_('COM_USERS_USER_GROUPS_HAVING_ACCESS');?></legend>
|
||||
<?php echo JHtml::_('access.usergroups', 'jform[rules]', $this->item->rules); ?>
|
||||
</fieldset>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
85
administrator/components/com_users/views/level/view.html.php
Normal file
85
administrator/components/com_users/views/level/view.html.php
Normal file
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* View to edit a user view level.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
* @since 1.6
|
||||
*/
|
||||
class UsersViewLevel extends JViewLegacy
|
||||
{
|
||||
protected $form;
|
||||
|
||||
protected $item;
|
||||
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->state = $this->get('State');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JFactory::getApplication()->input->set('hidemainmenu', true);
|
||||
|
||||
$isNew = ($this->item->id == 0);
|
||||
$canDo = UsersHelper::getActions();
|
||||
|
||||
JToolbarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_LEVEL_TITLE' : 'COM_USERS_VIEW_EDIT_LEVEL_TITLE'), 'levels-add');
|
||||
|
||||
if ($canDo->get('core.edit')||$canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::apply('level.apply');
|
||||
JToolbarHelper::save('level.save');
|
||||
}
|
||||
if ($canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::save2new('level.save2new');
|
||||
}
|
||||
// If an existing item, can save to a copy.
|
||||
if (!$isNew && $canDo->get('core.create')){
|
||||
JToolbarHelper::save2copy('level.save2copy');
|
||||
}
|
||||
if (empty($this->item->id)){
|
||||
JToolbarHelper::cancel('level.cancel');
|
||||
}
|
||||
else
|
||||
{
|
||||
JToolbarHelper::cancel('level.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::help('JHELP_USERS_ACCESS_LEVELS_EDIT');
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
172
administrator/components/com_users/views/levels/tmpl/default.php
Normal file
172
administrator/components/com_users/views/levels/tmpl/default.php
Normal file
@ -0,0 +1,172 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Include the component HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$canOrder = $user->authorise('core.edit.state', 'com_users');
|
||||
$saveOrder = $listOrder == 'a.ordering';
|
||||
$sortFields = $this->getSortFields();
|
||||
$saveOrder = $listOrder == 'a.ordering';
|
||||
if ($saveOrder)
|
||||
{
|
||||
$saveOrderingUrl = 'index.php?option=com_users&task=levels.saveOrderAjax&tmpl=component';
|
||||
JHtml::_('sortablelist.sortable', 'levelList', 'adminForm', strtolower($listDirn), $saveOrderingUrl);
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.orderTable = function()
|
||||
{
|
||||
table = document.getElementById("sortTable");
|
||||
direction = document.getElementById("directionTable");
|
||||
order = table.options[table.selectedIndex].value;
|
||||
if (order != '<?php echo $listOrder; ?>')
|
||||
{
|
||||
dirn = 'asc';
|
||||
}
|
||||
else
|
||||
{
|
||||
dirn = direction.options[direction.selectedIndex].value;
|
||||
}
|
||||
Joomla.tableOrdering(order, dirn, '');
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_users&view=levels');?>" method="post" id="adminForm" name="adminForm">
|
||||
<?php if (!empty( $this->sidebar)) : ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
<div id="filter-bar" class="btn-toolbar">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_USERS_SEARCH_TITLE_LEVELS'); ?>" />
|
||||
</div>
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
|
||||
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_RESET'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC'); ?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC'); ?></label>
|
||||
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC'); ?></option>
|
||||
<option value="asc" <?php if ($listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING'); ?></option>
|
||||
<option value="desc" <?php if ($listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="btn-group pull-right">
|
||||
<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY'); ?></label>
|
||||
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JGLOBAL_SORT_BY');?></option>
|
||||
<?php echo JHtml::_('select.options', $sortFields, 'value', 'text', $listOrder); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
|
||||
<table class="table table-striped" id="levelList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%" class="nowrap center hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
|
||||
</th>
|
||||
<th width="1%">
|
||||
<?php echo JHtml::_('grid.checkall'); ?>
|
||||
</th>
|
||||
<th class="left">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_LEVEL_NAME', 'a.title', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="5%" class="nowrap center hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="40%">
|
||||
 
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="15">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php $count = count($this->items); ?>
|
||||
<?php foreach ($this->items as $i => $item) :
|
||||
$ordering = ($listOrder == 'a.ordering');
|
||||
$canCreate = $user->authorise('core.create', 'com_users');
|
||||
$canEdit = $user->authorise('core.edit', 'com_users');
|
||||
$canChange = $user->authorise('core.edit.state', 'com_users');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="order nowrap center hidden-phone">
|
||||
<?php
|
||||
$iconClass = '';
|
||||
if (!$canChange)
|
||||
{
|
||||
$iconClass = ' inactive';
|
||||
}
|
||||
elseif (!$saveOrder)
|
||||
{
|
||||
$iconClass = ' inactive tip-top hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED');
|
||||
}
|
||||
?>
|
||||
<span class="sortable-handler<?php echo $iconClass ?>">
|
||||
<i class="icon-menu"></i>
|
||||
</span>
|
||||
<?php if ($canChange && $saveOrder) : ?>
|
||||
<input type="text" style="display:none" name="order[]" size="5" value="<?php echo $item->ordering; ?>" class="width-20 text-area-order " />
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($canEdit) : ?>
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_users&task=level.edit&id='.$item->id);?>">
|
||||
<?php echo $this->escape($item->title); ?></a>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($item->title); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo (int) $item->id; ?>
|
||||
</td>
|
||||
<td>
|
||||
 
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* The HTML Users access levels view.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
* @since 1.6
|
||||
*/
|
||||
class UsersViewLevels extends JViewLegacy
|
||||
{
|
||||
protected $items;
|
||||
|
||||
protected $pagination;
|
||||
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
|
||||
UsersHelper::addSubmenu('levels');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
$canDo = UsersHelper::getActions();
|
||||
|
||||
JToolbarHelper::title(JText::_('COM_USERS_VIEW_LEVELS_TITLE'), 'levels');
|
||||
|
||||
if ($canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::addNew('level.add');
|
||||
}
|
||||
if ($canDo->get('core.edit'))
|
||||
{
|
||||
JToolbarHelper::editList('level.edit');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
if ($canDo->get('core.delete'))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'level.delete');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
if ($canDo->get('core.admin'))
|
||||
{
|
||||
JToolbarHelper::preferences('com_users');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
JToolbarHelper::help('JHELP_USERS_ACCESS_LEVELS');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of fields the table can be sorted by
|
||||
*
|
||||
* @return array Array containing the field name to sort by as the key and display text as value
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
protected function getSortFields()
|
||||
{
|
||||
return array(
|
||||
'a.ordering' => JText::_('JGRID_HEADING_ORDERING'),
|
||||
'a.title' => JText::_('COM_USERS_HEADING_LEVEL_NAME'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
1
administrator/components/com_users/views/mail/index.html
Normal file
1
administrator/components/com_users/views/mail/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$script = "\t".'Joomla.submitbutton = function(pressbutton) {'."\n";
|
||||
$script .= "\t\t".'var form = document.adminForm;'."\n";
|
||||
$script .= "\t\t".'if (pressbutton == \'mail.cancel\') {'."\n";
|
||||
$script .= "\t\t\t".'Joomla.submitform(pressbutton);'."\n";
|
||||
$script .= "\t\t\t".'return;'."\n";
|
||||
$script .= "\t\t".'}'."\n";
|
||||
$script .= "\t\t".'// do field validation'."\n";
|
||||
$script .= "\t\t".'if (form.jform_subject.value == ""){'."\n";
|
||||
$script .= "\t\t\t".'alert("'.JText::_('COM_USERS_MAIL_PLEASE_FILL_IN_THE_SUBJECT', true).'");'."\n";
|
||||
$script .= "\t\t".'} else if (getSelectedValue(\'adminForm\',\'jform[group]\') < 0){'."\n";
|
||||
$script .= "\t\t\t".'alert("'.JText::_('COM_USERS_MAIL_PLEASE_SELECT_A_GROUP', true).'");'."\n";
|
||||
$script .= "\t\t".'} else if (form.jform_message.value == ""){'."\n";
|
||||
$script .= "\t\t\t".'alert("'.JText::_('COM_USERS_MAIL_PLEASE_FILL_IN_THE_MESSAGE', true).'");'."\n";
|
||||
$script .= "\t\t".'} else {'."\n";
|
||||
$script .= "\t\t\t".'Joomla.submitform(pressbutton);'."\n";
|
||||
$script .= "\t\t".'}'."\n";
|
||||
$script .= "\t\t".'}'."\n";
|
||||
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JFactory::getDocument()->addScriptDeclaration($script);
|
||||
?>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_users&view=mail'); ?>" name="adminForm" method="post" id="adminForm">
|
||||
<div class="row-fluid">
|
||||
<div class="span9">
|
||||
<fieldset class="adminform">
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('subject'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('subject'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('message'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('message'); ?></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
<div class="span3">
|
||||
<fieldset class="form-inline">
|
||||
<div class="control-group checkbox">
|
||||
<div class="controls"><?php echo $this->form->getInput('recurse'); ?> <?php echo $this->form->getLabel('recurse'); ?></div>
|
||||
</div>
|
||||
<div class="control-group checkbox">
|
||||
<div class="control-label"><?php echo $this->form->getInput('mode'); ?> <?php echo $this->form->getLabel('mode'); ?></div>
|
||||
</div>
|
||||
<div class="control-group checkbox">
|
||||
<div class="control-label"><?php echo $this->form->getInput('disabled'); ?> <?php echo $this->form->getLabel('disabled'); ?></div>
|
||||
</div>
|
||||
<div class="control-group checkbox">
|
||||
<div class="control-label"><?php echo $this->form->getInput('bcc'); ?> <?php echo $this->form->getLabel('bcc'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('group'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('group'); ?></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
54
administrator/components/com_users/views/mail/view.html.php
Normal file
54
administrator/components/com_users/views/mail/view.html.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Users mail view.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*/
|
||||
class UsersViewMail extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* @var object form object
|
||||
*/
|
||||
protected $form;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Get data from the model
|
||||
$this->form = $this->get('Form');
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JFactory::getApplication()->input->set('hidemainmenu', true);
|
||||
|
||||
JToolbarHelper::title(JText::_('COM_USERS_MASS_MAIL'), 'massmail.png');
|
||||
JToolbarHelper::custom('mail.send', 'envelope.png', 'send_f2.png', 'COM_USERS_TOOLBAR_MAIL_SEND_MAIL', false);
|
||||
JToolbarHelper::cancel('mail.cancel');
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::preferences('com_users');
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::help('JHELP_USERS_MASS_MAIL_USERS');
|
||||
}
|
||||
}
|
1
administrator/components/com_users/views/note/index.html
Normal file
1
administrator/components/com_users/views/note/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
79
administrator/components/com_users/views/note/tmpl/edit.php
Normal file
79
administrator/components/com_users/views/note/tmpl/edit.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == 'note.cancel' || document.formvalidator.isValid(document.id('note-form')))
|
||||
{
|
||||
Joomla.submitform(task, document.getElementById('note-form'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_users&view=note&id='.(int) $this->item->id);?>" method="post" name="adminForm" id="note-form" class="form-validate form-horizontal">
|
||||
<fieldset class="adminform">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('subject'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('subject'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('user_id'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('user_id'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('catid'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('catid'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('state'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('state'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('review_time'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('review_time'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('body'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('body'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</fieldset>
|
||||
</form>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
122
administrator/components/com_users/views/note/view.html.php
Normal file
122
administrator/components/com_users/views/note/view.html.php
Normal file
@ -0,0 +1,122 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* User note edit view
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
* @since 2.5
|
||||
*/
|
||||
class UsersViewNote extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* The edit form.
|
||||
*
|
||||
* @var JForm
|
||||
* @since 2.5
|
||||
*/
|
||||
protected $form;
|
||||
|
||||
/**
|
||||
* The item data.
|
||||
*
|
||||
* @var object
|
||||
* @since 2.5
|
||||
*/
|
||||
protected $item;
|
||||
|
||||
/**
|
||||
* The model state.
|
||||
*
|
||||
* @var JObject
|
||||
* @since 2.5
|
||||
*/
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Override the display method for the view.
|
||||
*
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return mixed A string if successful, otherwise a JError object.
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Initialise view variables.
|
||||
$this->state = $this->get('State');
|
||||
$this->item = $this->get('Item');
|
||||
$this->form = $this->get('Form');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Get the component HTML helpers
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
parent::display($tpl);
|
||||
$this->addToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the toolbar.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
$input = JFactory::getApplication()->input;
|
||||
$input->set('hidemainmenu', 1);
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$isNew = ($this->item->id == 0);
|
||||
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
|
||||
$canDo = UsersHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
|
||||
|
||||
JToolbarHelper::title(JText::_('COM_USERS_NOTES'), 'user');
|
||||
|
||||
// If not checked out, can save the item.
|
||||
if (!$checkedOut && ($canDo->get('core.edit') || (count($user->getAuthorisedCategories('com_users', 'core.create')))))
|
||||
{
|
||||
JToolbarHelper::apply('note.apply');
|
||||
JToolbarHelper::save('note.save');
|
||||
}
|
||||
|
||||
if (!$checkedOut && (count($user->getAuthorisedCategories('com_users', 'core.create'))))
|
||||
{
|
||||
JToolbarHelper::save2new('note.save2new');
|
||||
}
|
||||
|
||||
// If an existing item, can save to a copy.
|
||||
if (!$isNew && (count($user->getAuthorisedCategories('com_users', 'core.create')) > 0))
|
||||
{
|
||||
JToolbarHelper::save2copy('note.save2copy');
|
||||
}
|
||||
if (empty($this->item->id))
|
||||
{
|
||||
JToolbarHelper::cancel('note.cancel');
|
||||
}
|
||||
else
|
||||
{
|
||||
JToolbarHelper::cancel('note.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::help('JHELP_USERS_USER_NOTES_EDIT');
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
167
administrator/components/com_users/views/notes/tmpl/default.php
Normal file
167
administrator/components/com_users/views/notes/tmpl/default.php
Normal file
@ -0,0 +1,167 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$canEdit = $user->authorise('core.edit', 'com_users');
|
||||
$sortFields = $this->getSortFields();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.orderTable = function()
|
||||
{
|
||||
table = document.getElementById("sortTable");
|
||||
direction = document.getElementById("directionTable");
|
||||
order = table.options[table.selectedIndex].value;
|
||||
if (order != '<?php echo $listOrder; ?>')
|
||||
{
|
||||
dirn = 'asc';
|
||||
}
|
||||
else
|
||||
{
|
||||
dirn = direction.options[direction.selectedIndex].value;
|
||||
}
|
||||
Joomla.tableOrdering(order, dirn, '');
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_users&view=notes');?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if (!empty( $this->sidebar)) : ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
<div id="filter-bar" class="btn-toolbar">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_USERS_SEARCH_IN_NOTE_TITLE'); ?>" />
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
|
||||
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC'); ?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC'); ?></label>
|
||||
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC'); ?></option>
|
||||
<option value="asc" <?php if ($listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING'); ?></option>
|
||||
<option value="desc" <?php if ($listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="btn-group pull-right">
|
||||
<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY'); ?></label>
|
||||
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JGLOBAL_SORT_BY');?></option>
|
||||
<?php echo JHtml::_('select.options', $sortFields, 'value', 'text', $listOrder); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.checkall'); ?>
|
||||
</th>
|
||||
<th class="left" class="nowrap">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_USER_HEADING', 'u.name', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th class="left" class="nowrap">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_SUBJECT_HEADING', 'a.subject', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="20%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_CATEGORY_HEADING', 'c.title', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="5%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="10%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_REVIEW_HEADING', 'a.review_time', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="1%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="15">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php foreach ($this->items as $i => $item) : ?>
|
||||
<?php $canChange = $user->authorise('core.edit.state', 'com_users'); ?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="center checklist">
|
||||
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($canEdit) : ?>
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_users&task=note.edit&id='.$item->id);?>">
|
||||
<?php echo $this->escape($item->user_name); ?></a>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($item->user_name); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($item->subject) : ?>
|
||||
<?php echo $this->escape($item->subject); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::_('COM_USERS_EMPTY_SUBJECT'); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($item->catid && $item->cparams->get('image')) : ?>
|
||||
<?php echo JHtml::_('users.image', $item->cparams->get('image')); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->escape($item->category_title); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo JHtml::_('jgrid.published', $item->state, $i, 'notes.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if (intval($item->review_time)) : ?>
|
||||
<?php echo $this->escape($item->review_time); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::_('COM_USERS_EMPTY_REVIEW'); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo (int) $item->id; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
?>
|
||||
<div class="unotes">
|
||||
<h1><?php echo JText::sprintf('COM_USERS_NOTES_FOR_USER', $this->user->name, $this->user->id); ?></h1>
|
||||
<?php if (empty($this->items)) : ?>
|
||||
<?php echo JText::_('COM_USERS_NO_NOTES'); ?>
|
||||
<?php else : ?>
|
||||
<ol class="alternating">
|
||||
<?php foreach ($this->items as $item) : ?>
|
||||
<li>
|
||||
<div class="fltlft utitle">
|
||||
<?php if ($item->subject) : ?>
|
||||
<h4><?php echo JText::sprintf('COM_USERS_NOTE_N_SUBJECT', (int) $item->id, $this->escape($item->subject)); ?></h4>
|
||||
<?php else : ?>
|
||||
<h4><?php echo JText::sprintf('COM_USERS_NOTE_N_SUBJECT', (int) $item->id, JText::_('COM_USERS_EMPTY_SUBJECT')); ?></h4>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="fltlft utitle">
|
||||
<?php echo JHtml::date($item->created_time, 'D d M Y H:i'); ?>
|
||||
</div>
|
||||
|
||||
<?php $category_image = $item->cparams->get('image'); ?>
|
||||
|
||||
<?php if ($item->catid && isset($category_image)) : ?>
|
||||
<div class="fltlft utitle">
|
||||
<?php echo JHtml::_('users.image', $category_image); ?>
|
||||
</div>
|
||||
|
||||
<div class="fltlft utitle">
|
||||
<em><?php echo $this->escape($item->category_title); ?></em>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
<div class="ubody">
|
||||
<?php echo $item->body; ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
<?php endif; ?>
|
||||
</div>
|
178
administrator/components/com_users/views/notes/view.html.php
Normal file
178
administrator/components/com_users/views/notes/view.html.php
Normal file
@ -0,0 +1,178 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* User notes list view
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
* @since 2.5
|
||||
*/
|
||||
class UsersViewNotes extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* A list of user note objects.
|
||||
*
|
||||
* @var array
|
||||
* @since 2.5
|
||||
*/
|
||||
protected $items;
|
||||
|
||||
/**
|
||||
* The pagination object.
|
||||
*
|
||||
* @var JPagination
|
||||
* @since 2.5
|
||||
*/
|
||||
protected $pagination;
|
||||
|
||||
/**
|
||||
* The model state.
|
||||
*
|
||||
* @var JObject
|
||||
* @since 2.5
|
||||
*/
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* The model state.
|
||||
*
|
||||
* @var JUser
|
||||
* @since 2.5
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
/**
|
||||
* Override the display method for the view.
|
||||
*
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return mixed A string if successful, otherwise a JError object.
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Initialise view variables.
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = $this->get('User');
|
||||
|
||||
UsersHelper::addSubmenu('notes');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Get the component HTML helpers
|
||||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
|
||||
|
||||
// turn parameters into registry objects
|
||||
foreach ($this->items as $item)
|
||||
{
|
||||
$item->cparams = new JRegistry;
|
||||
$item->cparams->loadString($item->category_params);
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the toolbar.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
$canDo = UsersHelper::getActions();
|
||||
|
||||
JToolbarHelper::title(JText::_('COM_USERS_VIEW_NOTES_TITLE'), 'user');
|
||||
|
||||
if ($canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::addNew('note.add');
|
||||
}
|
||||
|
||||
if ($canDo->get('core.edit'))
|
||||
{
|
||||
JToolbarHelper::editList('note.edit');
|
||||
}
|
||||
|
||||
if ($canDo->get('core.edit.state'))
|
||||
{
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::publish('notes.publish', 'JTOOLBAR_PUBLISH', true);
|
||||
JToolbarHelper::unpublish('notes.unpublish', 'JTOOLBAR_UNPUBLISH', true);
|
||||
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::archiveList('notes.archive');
|
||||
JToolbarHelper::checkin('notes.checkin');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete'))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'notes.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
elseif ($canDo->get('core.edit.state'))
|
||||
{
|
||||
JToolbarHelper::trash('notes.trash');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
|
||||
if ($canDo->get('core.admin'))
|
||||
{
|
||||
JToolbarHelper::preferences('com_users');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
JToolbarHelper::help('JHELP_USERS_USER_NOTES');
|
||||
|
||||
JHtmlSidebar::setAction('index.php?option=com_users&view=notes');
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_PUBLISHED'),
|
||||
'filter_published',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true)
|
||||
);
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_CATEGORY'),
|
||||
'filter_category_id',
|
||||
JHtml::_('select.options', JHtml::_('category.options', 'com_users.notes'), 'value', 'text', $this->state->get('filter.category_id'))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of fields the table can be sorted by
|
||||
*
|
||||
* @return array Array containing the field name to sort by as the key and display text as value
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
protected function getSortFields()
|
||||
{
|
||||
return array(
|
||||
'u.name' => JText::_('COM_USERS_USER_HEADING'),
|
||||
'a.subject' => JText::_('COM_USERS_SUBJECT_HEADING'),
|
||||
'c.title' => JText::_('COM_USERS_CATEGORY_HEADING'),
|
||||
'a.state' => JText::_('JSTATUS'),
|
||||
'a.review_time' => JText::_('COM_USERS_REVIEW_HEADING'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
1
administrator/components/com_users/views/user/index.html
Normal file
1
administrator/components/com_users/views/user/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
93
administrator/components/com_users/views/user/tmpl/edit.php
Normal file
93
administrator/components/com_users/views/user/tmpl/edit.php
Normal file
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Include the component HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
$canDo = UsersHelper::getActions();
|
||||
|
||||
// Get the form fieldsets.
|
||||
$fieldsets = $this->form->getFieldsets();
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == 'user.cancel' || document.formvalidator.isValid(document.id('user-form')))
|
||||
{
|
||||
Joomla.submitform(task, document.getElementById('user-form'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_users&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="user-form" class="form-validate form-horizontal" enctype="multipart/form-data">
|
||||
|
||||
<?php echo JLayoutHelper::render('joomla.edit.item_title', $this); ?>
|
||||
|
||||
<fieldset>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'details')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'details', JText::_('COM_USERS_USER_ACCOUNT_DETAILS', true)); ?>
|
||||
<?php foreach ($this->form->getFieldset('user_details') as $field) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php if ($this->grouplist) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'groups', JText::_('COM_USERS_ASSIGNED_GROUPS', true)); ?>
|
||||
<?php echo $this->loadTemplate('groups'); ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
foreach ($fieldsets as $fieldset) :
|
||||
if ($fieldset->name == 'user_details') :
|
||||
continue;
|
||||
endif;
|
||||
?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', $fieldset->name, JText::_($fieldset->label, true)); ?>
|
||||
<?php foreach ($this->form->getFieldset($fieldset->name) as $field) : ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
</fieldset>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Include the component HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
?>
|
||||
<?php echo JHtml::_('access.usergroups', 'jform[groups]', $this->groups, true); ?>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
91
administrator/components/com_users/views/user/view.html.php
Normal file
91
administrator/components/com_users/views/user/view.html.php
Normal file
@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
* @since 1.5
|
||||
*/
|
||||
class UsersViewUser extends JViewLegacy
|
||||
{
|
||||
protected $form;
|
||||
|
||||
protected $item;
|
||||
|
||||
protected $grouplist;
|
||||
|
||||
protected $groups;
|
||||
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->grouplist = $this->get('Groups');
|
||||
$this->groups = $this->get('AssignedGroups');
|
||||
$this->state = $this->get('State');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->form->setValue('password', null);
|
||||
$this->form->setValue('password2', null);
|
||||
|
||||
parent::display($tpl);
|
||||
$this->addToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JFactory::getApplication()->input->set('hidemainmenu', true);
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$canDo = UsersHelper::getActions();
|
||||
$isNew = ($this->item->id == 0);
|
||||
$isProfile = $this->item->id == $user->id;
|
||||
|
||||
JToolbarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_USER_TITLE' : ($isProfile ? 'COM_USERS_VIEW_EDIT_PROFILE_TITLE' : 'COM_USERS_VIEW_EDIT_USER_TITLE')), $isNew ? 'user-add' : ($isProfile ? 'user-profile' : 'user-edit'));
|
||||
if ($canDo->get('core.edit')||$canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::apply('user.apply');
|
||||
JToolbarHelper::save('user.save');
|
||||
}
|
||||
if ($canDo->get('core.create')&&$canDo->get('core.manage'))
|
||||
{
|
||||
JToolbarHelper::save2new('user.save2new');
|
||||
}
|
||||
if (empty($this->item->id))
|
||||
{
|
||||
JToolbarHelper::cancel('user.cancel');
|
||||
}
|
||||
else
|
||||
{
|
||||
JToolbarHelper::cancel('user.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::help('JHELP_USERS_USER_MANAGER_EDIT');
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
211
administrator/components/com_users/views/users/tmpl/default.php
Normal file
211
administrator/components/com_users/views/users/tmpl/default.php
Normal file
@ -0,0 +1,211 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
$canDo = UsersHelper::getActions();
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$loggeduser = JFactory::getUser();
|
||||
$sortFields = $this->getSortFields();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.orderTable = function()
|
||||
{
|
||||
table = document.getElementById("sortTable");
|
||||
direction = document.getElementById("directionTable");
|
||||
order = table.options[table.selectedIndex].value;
|
||||
if (order != '<?php echo $listOrder; ?>')
|
||||
{
|
||||
dirn = 'asc';
|
||||
}
|
||||
else
|
||||
{
|
||||
dirn = direction.options[direction.selectedIndex].value;
|
||||
}
|
||||
Joomla.tableOrdering(order, dirn, '');
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_users&view=users');?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if (!empty( $this->sidebar)) : ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
<div id="filter-bar" class="btn-toolbar">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_USERS_SEARCH_USERS'); ?>" />
|
||||
</div>
|
||||
<div class="btn-group pull-left">
|
||||
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
|
||||
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_RESET'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC'); ?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC'); ?></label>
|
||||
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC'); ?></option>
|
||||
<option value="asc" <?php if ($listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING'); ?></option>
|
||||
<option value="desc" <?php if ($listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="btn-group pull-right">
|
||||
<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY'); ?></label>
|
||||
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JGLOBAL_SORT_BY');?></option>
|
||||
<?php echo JHtml::_('select.options', $sortFields, 'value', 'text', $listOrder); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.checkall'); ?>
|
||||
</th>
|
||||
<th class="left">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_NAME', 'a.name', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="10%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JGLOBAL_USERNAME', 'a.username', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="5%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_ENABLED', 'a.block', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="5%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_ACTIVATED', 'a.activation', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="10%" class="nowrap center">
|
||||
<?php echo JText::_('COM_USERS_HEADING_GROUPS'); ?>
|
||||
</th>
|
||||
<th width="15%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JGLOBAL_EMAIL', 'a.email', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="10%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_LAST_VISIT_DATE', 'a.lastvisitDate', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="10%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_REGISTRATION_DATE', 'a.registerDate', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="1%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="15">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php foreach ($this->items as $i => $item) :
|
||||
$canEdit = $canDo->get('core.edit');
|
||||
$canChange = $loggeduser->authorise('core.edit.state', 'com_users');
|
||||
|
||||
// If this group is super admin and this user is not super admin, $canEdit is false
|
||||
if ((!$loggeduser->authorise('core.admin')) && JAccess::check($item->id, 'core.admin'))
|
||||
{
|
||||
$canEdit = false;
|
||||
$canChange = false;
|
||||
}
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="center">
|
||||
<?php if ($canEdit) : ?>
|
||||
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($canEdit) : ?>
|
||||
<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)); ?>">
|
||||
<?php echo $this->escape($item->name); ?></a>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($item->name); ?>
|
||||
<?php endif; ?>
|
||||
<div>
|
||||
<?php echo JHtml::_('users.filterNotes', $item->note_count, $item->id); ?>
|
||||
<?php echo JHtml::_('users.notes', $item->note_count, $item->id); ?>
|
||||
<?php echo JHtml::_('users.addNote', $item->id); ?>
|
||||
</div>
|
||||
<?php if (JDEBUG) : ?>
|
||||
<div class="small"><a href="<?php echo JRoute::_('index.php?option=com_users&view=debuguser&user_id='.(int) $item->id);?>">
|
||||
<?php echo JText::_('COM_USERS_DEBUG_USER');?></a></div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo $this->escape($item->username); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canChange) : ?>
|
||||
<?php
|
||||
$self = $loggeduser->id == $item->id;
|
||||
echo JHtml::_('jgrid.state', JHtmlUsers::blockStates($self), $item->block, $i, 'users.', !$self);
|
||||
?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::_($item->block ? 'JNO' : 'JYES'); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php
|
||||
$activated = empty( $item->activation) ? 0 : 1;
|
||||
echo JHtml::_('jgrid.state', JHtmlUsers::activateStates(), $activated, $i, 'users.', (boolean) $activated);
|
||||
?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if (substr_count($item->group_names, "\n") > 1) : ?>
|
||||
<span class="hasTooltip" title="<?php echo JHtml::tooltipText(JText::_('COM_USERS_HEADING_GROUPS'), nl2br($item->group_names), 0); ?>"><?php echo JText::_('COM_USERS_USERS_MULTIPLE_GROUPS'); ?></span>
|
||||
<?php else : ?>
|
||||
<?php echo nl2br($item->group_names); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo JStringPunycode::emailToUTF8($this->escape($item->email)); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($item->lastvisitDate != '0000-00-00 00:00:00'):?>
|
||||
<?php echo JHtml::_('date', $item->lastvisitDate, 'Y-m-d H:i:s'); ?>
|
||||
<?php else:?>
|
||||
<?php echo JText::_('JNEVER'); ?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo JHtml::_('date', $item->registerDate, 'Y-m-d H:i:s'); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo (int) $item->id; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php //Load the batch processing form. ?>
|
||||
<?php echo $this->loadTemplate('batch'); ?>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Create the copy/move options.
|
||||
$options = array(
|
||||
JHtml::_('select.option', 'add', JText::_('COM_USERS_BATCH_ADD')),
|
||||
JHtml::_('select.option', 'del', JText::_('COM_USERS_BATCH_DELETE')),
|
||||
JHtml::_('select.option', 'set', JText::_('COM_USERS_BATCH_SET'))
|
||||
);
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
?>
|
||||
<div class="modal hide fade" id="collapseModal">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">x</button>
|
||||
<h3><?php echo JText::_('COM_USERS_BATCH_OPTIONS');?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="batch-choose-action" class="combo control-group">
|
||||
<label id="batch-choose-action-lbl" class="control-label" for="batch-choose-action">
|
||||
<?php echo JText::_('COM_USERS_BATCH_GROUP') ?>
|
||||
</label>
|
||||
</div>
|
||||
<div id="batch-choose-action" class="combo controls">
|
||||
<div class="control-group">
|
||||
<select name="batch[group_id]" class="inputbox" id="batch-group-id">
|
||||
<option value=""><?php echo JText::_('JSELECT') ?></option>
|
||||
<?php echo JHtml::_('select.options', JHtml::_('user.groups')); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group radio">
|
||||
<?php echo JHtml::_('select.radiolist', $options, 'batch[group_action]', '', 'value', 'text', 'add') ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" type="button" onclick="document.id('batch-group-id').value=''" data-dismiss="modal">
|
||||
<?php echo JText::_('JCANCEL'); ?>
|
||||
</button>
|
||||
<button class="btn btn-primary" type="submit" onclick="Joomla.submitbutton('user.batch');">
|
||||
<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
$input = JFactory::getApplication()->input;
|
||||
$field = $input->getCmd('field');
|
||||
$function = 'jSelectUser_'.$field;
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
?>
|
||||
<form action="<?php echo JRoute::_('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">
|
||||
<fieldset class="filter">
|
||||
<div id="filter-bar" class="btn-toolbar">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<label for="filter_search" class="element-invisible"><?php echo JText::_('JSEARCH_FILTER'); ?></label>
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_USERS_SEARCH_IN_NAME'); ?>" />
|
||||
</div>
|
||||
<div class="btn-group pull-left hidden-phone">
|
||||
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
|
||||
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
|
||||
<button type="button" class="btn" onclick="if (window.parent) window.parent.<?php echo $this->escape($function); ?>('', '<?php echo JText::_('JLIB_FORM_SELECT_USER'); ?>');"><?php echo JText::_('JOPTION_NO_USER'); ?></button>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="filter_group_id" class="element-invisible"><?php echo JText::_('COM_USERS_FILTER_USER_GROUP'); ?></label>
|
||||
<?php echo JHtml::_('access.usergroup', 'filter_group_id', $this->state->get('filter.group_id'), 'onchange="this.form.submit()"'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="left">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_NAME', 'a.name', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap" width="25%">
|
||||
<?php echo JHtml::_('grid.sort', 'JGLOBAL_USERNAME', 'a.username', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap" width="25%">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_GROUPS', 'group_names', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="15">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($this->items as $item) : ?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td>
|
||||
<a class="pointer" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $item->id; ?>', '<?php echo $this->escape(addslashes($item->name)); ?>');">
|
||||
<?php echo $item->name; ?></a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<?php echo $item->username; ?>
|
||||
</td>
|
||||
<td align="left">
|
||||
<?php echo nl2br($item->group_names); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="field" value="<?php echo $this->escape($field); ?>" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
160
administrator/components/com_users/views/users/view.html.php
Normal file
160
administrator/components/com_users/views/users/view.html.php
Normal file
@ -0,0 +1,160 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* View class for a list of users.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
* @since 1.6
|
||||
*/
|
||||
class UsersViewUsers extends JViewLegacy
|
||||
{
|
||||
protected $items;
|
||||
|
||||
protected $pagination;
|
||||
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
|
||||
UsersHelper::addSubmenu('users');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Include the component HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
|
||||
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
$canDo = UsersHelper::getActions();
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
|
||||
JToolbarHelper::title(JText::_('COM_USERS_VIEW_USERS_TITLE'), 'user');
|
||||
|
||||
if ($canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::addNew('user.add');
|
||||
}
|
||||
if ($canDo->get('core.edit'))
|
||||
{
|
||||
JToolbarHelper::editList('user.edit');
|
||||
}
|
||||
|
||||
if ($canDo->get('core.edit.state'))
|
||||
{
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::publish('users.activate', 'COM_USERS_TOOLBAR_ACTIVATE', true);
|
||||
JToolbarHelper::unpublish('users.block', 'COM_USERS_TOOLBAR_BLOCK', true);
|
||||
JToolbarHelper::custom('users.unblock', 'unblock.png', 'unblock_f2.png', 'COM_USERS_TOOLBAR_UNBLOCK', true);
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
|
||||
if ($canDo->get('core.delete'))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'users.delete');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($user->authorise('core.create', 'com_users') && $user->authorise('core.edit', 'com_users') && $user->authorise('core.edit.state', 'com_users'))
|
||||
{
|
||||
JHtml::_('bootstrap.modal', 'collapseModal');
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($canDo->get('core.admin'))
|
||||
{
|
||||
JToolbarHelper::preferences('com_users');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
|
||||
JToolbarHelper::help('JHELP_USERS_USER_MANAGER');
|
||||
|
||||
JHtmlSidebar::setAction('index.php?option=com_users&view=users');
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('COM_USERS_FILTER_STATE'),
|
||||
'filter_state',
|
||||
JHtml::_('select.options', UsersHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state'))
|
||||
);
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('COM_USERS_FILTER_ACTIVE'),
|
||||
'filter_active',
|
||||
JHtml::_('select.options', UsersHelper::getActiveOptions(), 'value', 'text', $this->state->get('filter.active'))
|
||||
);
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('COM_USERS_FILTER_USERGROUP'),
|
||||
'filter_group_id',
|
||||
JHtml::_('select.options', UsersHelper::getGroups(), 'value', 'text', $this->state->get('filter.group_id'))
|
||||
);
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('COM_USERS_OPTION_FILTER_DATE'),
|
||||
'filter_range',
|
||||
JHtml::_('select.options', Usershelper::getRangeOptions(), 'value', 'text', $this->state->get('filter.range'))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of fields the table can be sorted by
|
||||
*
|
||||
* @return array Array containing the field name to sort by as the key and display text as value
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
protected function getSortFields()
|
||||
{
|
||||
return array(
|
||||
'a.name' => JText::_('COM_USERS_HEADING_NAME'),
|
||||
'a.username' => JText::_('JGLOBAL_USERNAME'),
|
||||
'a.block' => JText::_('COM_USERS_HEADING_ENABLED'),
|
||||
'a.activation' => JText::_('COM_USERS_HEADING_ACTIVATED'),
|
||||
'a.email' => JText::_('JGLOBAL_EMAIL'),
|
||||
'a.lastvisitDate' => JText::_('COM_USERS_HEADING_LAST_VISIT_DATE'),
|
||||
'a.registerDate' => JText::_('COM_USERS_HEADING_REGISTRATION_DATE'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user