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