- md5
- ecbcb4e247f5f9cf1771202a336c090e
- sha1
- 2a0f56218b757383a2fc28efac3fa8852f7e4058
- sha256
- 9493263b735eb997731c9163b658c1301e26212b65d3f30f7f1c27afc055ad43
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
<?php
/**
* @version $Id: view.html.php 21655 2011-06-23 05:43:24Z chdemko $
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access.
defined('_JEXEC') or die;
jimport('joomla.application.component.view');
/**
* View class for a list of user groups.
*
* @package Joomla.Administrator
* @subpackage com_users
* @since 1.6
*/
class UsersViewGroups extends JView
{
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');
// 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()
{
$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');
}
}
The same content is in 6 releases, Joomla 1.7.0 to 1.7.5. See them all, or every version of this file.