- md5
- 33b2b576c4f1e28593043f937f6a0312
- sha1
- 01a6bec79c00d4871e42e9ebbd517eabd80c4b54
- sha256
- 9dae1cf6e2ca3aff73beb058dc39119d4aaf7da63192b6c45faa1c1f4608224e
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
<?php
/**
* @version $Id: view.html.php 20196 2011-01-09 02:40:25Z ian $
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
jimport('joomla.application.component.view');
/**
* The HTML Menus Menu Menus View.
*
* @package Joomla.Administrator
* @subpackage com_menus
* @version 1.6
*/
class MenusViewMenus extends JView
{
protected $items;
protected $modules;
protected $pagination;
protected $state;
/**
* Display the view
*/
public function display($tpl = null)
{
$this->items = $this->get('Items');
$this->modules = $this->get('Modules');
$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;
}
parent::display($tpl);
$this->addToolbar();
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT.'/helpers/menus.php';
$canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
JToolBarHelper::title(JText::_('COM_MENUS_VIEW_MENUS_TITLE'), 'menumgr.png');
if ($canDo->get('core.create')) {
JToolBarHelper::custom('menu.add', 'new.png', 'new_f2.png', 'JTOOLBAR_NEW', false);
}
if ($canDo->get('core.edit')) {
JToolBarHelper::custom('menu.edit', 'edit.png', 'edit_f2.png', 'JTOOLBAR_EDIT', true);
}
if ($canDo->get('core.delete')) {
JToolBarHelper::divider();
JToolBarHelper::deleteList('', 'menus.delete','JTOOLBAR_DELETE');
}
JToolBarHelper::custom('menus.rebuild', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_REBUILD', false);
if ($canDo->get('core.admin')) {
JToolBarHelper::divider();
JToolBarHelper::preferences('com_menus');
}
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_MENUS_MENU_MANAGER');
}
}
The same content is in 7 releases, Joomla 1.6.0 to 1.6.6. See them all, or every version of this file.