[ Index ]

PHP Cross Reference of Mambo 4.6.5

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

title

Body

[close]

/administrator/components/com_categories/ -> toolbar.categories.html.php (source)

   1  <?php
   2  /**
   3  * @package Mambo
   4  * @subpackage Categories
   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  class TOOLBAR_categories {
  18      /**
  19      * Draws the menu for Editing an existing category
  20      * @param int The published state (to display the inverse button)
  21      */
  22  	function _EDIT() {
  23          global $id;
  24          
  25          mosMenuBar::startTable();
  26          mosMenuBar::media_manager();
  27          mosMenuBar::spacer();
  28          mosMenuBar::save();
  29          mosMenuBar::spacer();
  30          mosMenuBar::apply();
  31          mosMenuBar::spacer();
  32          if ( $id ) {
  33              // for existing content items the button is renamed `close`
  34              mosMenuBar::cancel( 'cancel', T_('Close') );
  35          } else {
  36              mosMenuBar::cancel();
  37          }
  38          mosMenuBar::spacer();
  39          $section='';
  40          if (strstr($GLOBALS['section'], 'com_contact')){
  41              $section = 'contact.';
  42          } 
  43          if (strstr($GLOBALS['section'], 'com_newsfeeds')){
  44              $section = 'newsfeeds.';            
  45          }
  46          if (strstr($GLOBALS['section'], 'com_weblinks')){
  47              $section = 'weblinks.';            
  48          }
  49          
  50          if ($GLOBALS['task'] == 'new') {
  51              mosMenuBar::help( $section.'new' );
  52          } else {
  53              mosMenuBar::help( $section.'edit' );
  54          }
  55          mosMenuBar::endTable();
  56      }
  57      /**
  58      * Draws the menu for Moving existing categories
  59      * @param int The published state (to display the inverse button)
  60      */
  61  	function _MOVE() {
  62          mosMenuBar::startTable();
  63          mosMenuBar::save( 'movesave' );
  64          mosMenuBar::spacer();
  65          mosMenuBar::cancel();
  66          mosMenuBar::spacer();
  67          mosMenuBar::help( 'move' );
  68          mosMenuBar::endTable();
  69      }
  70      /**
  71      * Draws the menu for Copying existing categories
  72      * @param int The published state (to display the inverse button)
  73      */
  74  	function _COPY() {
  75          mosMenuBar::startTable();
  76          mosMenuBar::save( 'copysave' );
  77          mosMenuBar::spacer();
  78          mosMenuBar::cancel();
  79          mosMenuBar::spacer();
  80          mosMenuBar::help( 'copy' );
  81          mosMenuBar::endTable();
  82      }
  83      /**
  84      * Draws the menu for Editing an existing category
  85      */
  86  	function _DEFAULT(){
  87          $section = mosGetParam( $_REQUEST, 'section', '' );
  88  
  89          mosMenuBar::startTable();
  90          mosMenuBar::publishList();
  91          mosMenuBar::spacer();
  92          mosMenuBar::unpublishList();
  93          mosMenuBar::spacer();
  94          mosMenuBar::addNewX();
  95          mosMenuBar::spacer();
  96          if ( $section == 'content' || ( $section > 0 ) ) {
  97              mosMenuBar::customX( 'moveselect', 'move.png', 'move_f2.png', T_('Move'), true );
  98              mosMenuBar::spacer();
  99              mosMenuBar::customX( 'copyselect', 'copy.png', 'copy_f2.png', T_('Copy'), true );
 100              mosMenuBar::spacer();
 101          }
 102          mosMenuBar::editListX();
 103          mosMenuBar::spacer();
 104          mosMenuBar::deleteList();
 105          mosMenuBar::spacer();
 106          
 107          $section='';
 108          
 109          if (strstr($GLOBALS['section'], 'com_contact')){
 110              $section = 'contact.';
 111          } 
 112          if (strstr($GLOBALS['section'], 'com_newsfeeds')){
 113              $section = 'newsfeeds.';            
 114          }
 115          if (strstr($GLOBALS['section'], 'com_weblinks')){
 116              $section = 'weblinks.';            
 117          }
 118          mosMenuBar::help( $section.'manager' );
 119          mosMenuBar::endTable();
 120      }
 121  }
 122  ?>