[ Index ]

PHP Cross Reference of Mambo 4.6.5

[ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/administrator/components/com_menus/ -> toolbar.menus.html.php (source)

   1  <?php
   2  /**
   3  * @package Mambo
   4  * @subpackage Menus
   5  * @author Mambo Foundation Inc see README.php
   6  * @copyright (C) 2000 - 2009 Mambo Foundation Inc.
   7  * See COPYRIGHT.php for copyright notices and details.
   8  * @license GNU/GPL Version 2, see LICENSE.php
   9  *
  10  * Redistributions of files must retain the above copyright notice.
  11  *
  12  * Mambo is free software; you can redistribute it and/or
  13  * modify it under the terms of the GNU General Public License
  14  * as published by the Free Software Foundation; version 2 of the License.
  15  */
  16  
  17  /** ensure this file is being included by a parent file */
  18  defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
  19  
  20  class TOOLBAR_menus {
  21      /**
  22      * Draws the menu for a New top menu item
  23      */
  24  	function _NEW()    {
  25          mosMenuBar::startTable();
  26          mosMenuBar::customX( 'edit', 'next.png', 'next_f2.png', T_('Next'), true );
  27          mosMenuBar::spacer();
  28          mosMenuBar::cancel();
  29          mosMenuBar::spacer();
  30          mosMenuBar::help( 'new' );
  31          mosMenuBar::endTable();
  32      }
  33  
  34      /**
  35      * Draws the menu to Move Menut Items
  36      */
  37  	function _MOVEMENU()    {
  38          mosMenuBar::startTable();
  39          mosMenuBar::custom( 'movemenusave', 'move.png', 'move_f2.png', T_('Move'), false );
  40          mosMenuBar::spacer();
  41          mosMenuBar::cancel( 'cancelmovemenu' );
  42          mosMenuBar::spacer();
  43          mosMenuBar::help( 'move' );
  44          mosMenuBar::endTable();
  45      }
  46  
  47      /**
  48      * Draws the menu to Move Menut Items
  49      */
  50  	function _COPYMENU()    {
  51          mosMenuBar::startTable();
  52          mosMenuBar::custom( 'copymenusave', 'copy.png', 'copy_f2.png', T_('Copy'), false );
  53          mosMenuBar::spacer();
  54          mosMenuBar::cancel( 'cancelcopymenu' );
  55          mosMenuBar::spacer();
  56          mosMenuBar::help( 'copy' );
  57          mosMenuBar::endTable();
  58      }
  59  
  60      /**
  61      * Draws the menu to edit a menu item
  62      */
  63  	function _EDIT($type) {
  64          global $id;
  65          $hs='';
  66  
  67          if ( !$id ) {
  68              $cid = mosGetParam( $_POST, 'cid', array(0) );
  69              $id = $cid[0];
  70          }
  71          $menutype     = mosGetParam( $_REQUEST, 'menutype', 'mainmenu' );
  72          
  73          mosMenuBar::startTable();
  74          if ( !$id ) {
  75              $link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=new&hidemainmenu=1';
  76              mosMenuBar::back( T_('Back'), $link );
  77              mosMenuBar::spacer();
  78          }
  79          mosMenuBar::save();
  80          mosMenuBar::spacer();
  81          mosMenuBar::apply();
  82          mosMenuBar::spacer();
  83          if ( $id ) {
  84              // for existing content items the button is renamed `close`
  85              mosMenuBar::cancel( 'cancel', T_('Close') );
  86          } else {
  87              mosMenuBar::cancel();
  88          }
  89          mosMenuBar::spacer();
  90          mosMenuBar::help( $type ); 
  91          mosMenuBar::endTable();
  92      }
  93  
  94  	function _DEFAULT() {
  95          mosMenuBar::startTable();
  96          mosMenuBar::addNewX();
  97          mosMenuBar::spacer();
  98          mosMenuBar::editListX();
  99          mosMenuBar::spacer();
 100          mosMenuBar::publishList();
 101          mosMenuBar::spacer();
 102          mosMenuBar::unpublishList();
 103          mosMenuBar::spacer();
 104          mosMenuBar::customX( 'movemenu', 'move.png', 'move_f2.png', T_('Move'), true );
 105          mosMenuBar::spacer();
 106          mosMenuBar::customX( 'copymenu', 'copy.png', 'copy_f2.png', T_('Copy'), true );
 107          mosMenuBar::spacer();
 108          mosMenuBar::trash();
 109          mosMenuBar::spacer();
 110          mosMenuBar::help( 'main' );
 111          mosMenuBar::endTable();
 112      }
 113  }
 114  ?>