<?php
// $Id: menumodules.php,v 1.12 2004/01/03 10:48:03 saka_car Exp $
/**
* Modules Button Bar HTML
* @package Mambo Open Source
* @Copyright (C) 2000 - 2003 Miro International Pty Ltd
* @ All rights reserved
* @ Mambo Open Source is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version $Revision: 1.12 $
**/

class menumodules {
	/**
	* Draws the menu for a New module
	*/
	function NEW_MENU()	{
		mosMenuBar::startTable();
		mosMenuBar::preview( 'modulewindow' );
		mosMenuBar::divider();
		mosMenuBar::save();
		mosMenuBar::back();
		mosMenuBar::spacer();
		mosMenuBar::endTable();
	}

	/**
	* Draws the menu for Editting an existing module
	*/
	function EDIT_MENU( $cur_template, $publish ) {
		mosMenuBar::startTable();
		//	if ($publish == 0) {
		//		mosMenuBar::publish();
		//	} else {
		//		mosMenuBar::unpublish();
		//	}

		//	mosMenuBar::divider();
		?>
			<td><a class="toolbar" href="#" onClick=" var content = document.adminForm.content.value; content = content.replace('#', '');  var title = document.adminForm.title.value; title = title.replace('#', ''); window.open('popups/modulewindow.php?title=' + title + '&content=' + content + '&t=<?php echo $cur_template; ?>', 'win1', 'status=no,toolbar=no,scrollbars=auto,titlebar=no,menubar=no,resizable=yes,width=200,height=400,directories=no,location=no');" onmouseout="MM_swapImgRestore();"  onmouseover="MM_swapImage('preview','','images/preview_f2.png',1);"><img src="images/preview.png" alt="Preview" border="0" name="preview" align="middle">&nbsp;Preview</a></td>
		<?php
		mosMenuBar::divider();
		mosMenuBar::save();
		mosMenuBar::cancel();
		mosMenuBar::spacer();
		mosMenuBar::endTable();
	}
	function MENU_Default() {
                mosMenuBar::startTable();
                mosMenuBar::publishList();
                mosMenuBar::unpublishList();
                mosMenuBar::divider();
                mosMenuBar::addNew();
                mosMenuBar::editList();
                mosMenuBar::deleteList();
                mosMenuBar::spacer();
                mosMenuBar::endTable();
        }

}
?>
