[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/administrator/components/com_modules/ -> toolbar.modules.html.php (source)

   1  <?php
   2  /**
   3   * @version        $Id: toolbar.modules.html.php 14401 2010-01-26 14:10:00Z louis $
   4   * @package        Joomla
   5   * @subpackage    Modules
   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  /**
  16   * @package        Joomla
  17   * @subpackage    Modules
  18   */
  19  class TOOLBAR_modules {
  20      /**
  21      * Draws the menu for a New module
  22      */
  23  	function _NEW($client)
  24      {
  25          JToolBarHelper::title( JText::_( 'Module' ) . ': <small><small>[ '. JText::_( 'New' ) .' ]</small></small>', 'module.png' );
  26          JToolBarHelper::customX( 'edit', 'forward.png', 'forward_f2.png', 'Next', true );
  27          JToolBarHelper::cancel();
  28          if ($client->name == 'site') {
  29              JToolBarHelper::help( 'screen.modulessite.edit' );
  30          } 
  31          else {
  32              JToolBarHelper::help( 'screen.modulesadministrator.edit');
  33          }
  34      }
  35  
  36      /**
  37      * Draws the menu for Editing an existing module
  38      */
  39  	function _EDIT( $client )
  40      {
  41          $moduleType = JRequest::getCmd( 'module' );
  42          $cid         = JRequest::getVar( 'cid', array(0), '', 'array' );
  43          JArrayHelper::toInteger($cid, array(0));
  44  
  45          JToolBarHelper::title( JText::_( 'Module' ) . ': <small><small>[ '. JText::_( 'Edit' ) .' ]</small></small>', 'module.png' );
  46  
  47          if($moduleType == 'custom') {
  48              JToolBarHelper::Preview('index.php?option=com_modules&tmpl=component&client='.$client->id.'&pollid='.$cid[0]);
  49          }
  50  
  51          JToolBarHelper::save();
  52          JToolBarHelper::apply();
  53          if ( $cid[0] ) {
  54              // for existing items the button is renamed `close`
  55              JToolBarHelper::cancel( 'cancel', 'Close' );
  56          } else {
  57              JToolBarHelper::cancel();
  58          }
  59          JToolBarHelper::help( 'screen.modules.edit' );
  60      }
  61  
  62  	function _DEFAULT($client)
  63      {
  64          JToolBarHelper::title( JText::_( 'Module Manager' ), 'module.png' );
  65          JToolBarHelper::publishList();
  66          JToolBarHelper::unpublishList();
  67          JToolBarHelper::custom( 'copy', 'copy.png', 'copy_f2.png', 'Copy', true );
  68          JToolBarHelper::deleteList();
  69          JToolBarHelper::editListX();
  70          JToolBarHelper::addNewX();
  71          JToolBarHelper::help( 'screen.modules' );
  72      }
  73  }


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1