Files
@ c7d7e38b2269
Branch filter:
Location: hot67beta/administrator/components/com_menus/views/menus/view.php
c7d7e38b2269
3.8 KiB
text/x-php
Initial import of the site.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | <?php
/**
* @version $Id: view.php 10381 2008-06-01 03:35:53Z pasamio $
* @package Joomla
* @subpackage Menus
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.view');
/**
* @package Joomla
* @subpackage Menus
* @since 1.5
*/
class MenusViewMenus extends JView
{
function display($tpl=null)
{
global $mainframe;
$this->_layout = 'default';
// Set toolbar items for the page
JToolBarHelper::title( JText::_( 'Menu Manager' ), 'menumgr.png' );
JToolBarHelper::customX( 'copyMenu', 'copy.png', 'copy_f2.png', 'Copy', true );
JToolBarHelper::customX( 'deleteMenu', 'delete.png', 'delete_f2.png', 'Delete', true );
JToolBarHelper::editListX('editMenu');
JToolBarHelper::addNewX('addMenu');
JToolBarHelper::help( 'screen.menumanager' );
$document = & JFactory::getDocument();
$document->setTitle(JText::_('View Menus'));
$limitstart = JRequest::getVar('limitstart', '0', '', 'int');
$menus = &$this->get('Menus');
$pagination = &$this->get('Pagination');
$this->assignRef('menus', $menus);
$this->assignRef('pagination', $pagination);
$this->assignRef('limitstart', $limitstart);
JHTML::_('behavior.tooltip');
parent::display($tpl);
}
function copyForm($tpl=null)
{
global $mainframe;
$this->_layout = 'copy';
// view data
$table = $this->get('Table');
$items = $this->get('MenuItems');
/*
* Set toolbar items for the page
*/
JToolBarHelper::title( JText::_( 'Copy Menu' ) );
JToolBarHelper::custom( 'doCopyMenu', 'copy.png', 'copy_f2.png', 'Copy', false );
JToolBarHelper::cancel();
JToolBarHelper::help( 'screen.menumanager' );
$document = & JFactory::getDocument();
$document->setTitle('Copy Menu Items');
$this->assignRef('items', $items);
$this->assignRef('table', $table);
parent::display($tpl);
}
function deleteForm($tpl=null)
{
global $mainframe;
$this->_layout = 'delete';
/*
* Set toolbar items for the page
*/
JToolBarHelper::title( JText::_( 'Menu' ) . ': <small><small>[ '. JText::_( 'Delete' ) .' ]</small></small>' );
JToolBarHelper::custom( 'doDeleteMenu', 'delete.png', 'delete_f2.png', 'Delete', false );
JToolBarHelper::cancel();
JToolBarHelper::help( 'screen.menumanager.delete' );
// view data
$table = $this->get('Table');
$modules = $this->get('Modules');
$menuItems = $this->get('MenuItems');
$document = & JFactory::getDocument();
$document->setTitle('Confirm Delete Menu Type: ' . $table->menutype );
$this->assignRef('table', $table);
$this->assignRef('modules', $modules);
$this->assignRef('menuItems', $menuItems);
parent::display($tpl);
}
function editForm($edit,$tpl=null)
{
JRequest::setVar( 'hidemainmenu', 1 );
global $mainframe;
$this->_layout = 'edit';
if($edit)
$table = &$this->get('Table');
else
$table=& JTable::getInstance('menuTypes');
/*
* Set toolbar items for the page
*/
$text = ( ($table->id != 0) ? JText::_( 'Edit' ) : JText::_( 'New' ) );
JToolBarHelper::title( JText::_( 'Menu Details' ).': <small><small>[ '. $text.' ]</small></small>', 'menumgr.png' );
JToolBarHelper::custom( 'savemenu', 'save.png', 'save_f2.png', 'Save', false );
JToolBarHelper::cancel();
JToolBarHelper::help( 'screen.menumanager.new' );
$this->assignRef('row', $table);
$this->assign('isnew', ($table->id == 0));
JHTML::_('behavior.tooltip');
parent::display($tpl);
}
}
|