<?php
	/**************************************************************************\
	* phpGroupWare TTS                                                         *
	* http://www.phpgroupware.org                                              *
	* Written by Joseph Engo <jengo@phpgroupware.org>                          *
	* --------------------------------------------                             *
	*  This program is free software; you can redistribute it and/or modify it *
	*  under the terms of the GNU General Public License as published by the   *
	*  Free Software Foundation; either version 2 of the License, or (at your  *
	*  option) any later version.                                              *
	\**************************************************************************/

	// $Id: hook_sidebox_menu.inc.php,v 1.1.2.1 2004/12/03 10:25:47 kazuyan Exp $

	$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu');
	$file = Array(
		Array('text'	=> 'New ticket',
			'url'		=> $GLOBALS['phpgw']->link('/tts/newticket.php')),
		Array('text'	=> 'View all tickets',
			'url'		=> $GLOBALS['phpgw']->link('/tts/index.php','filter=viewall')),
		Array('text'	=> 'View only open tickets',
			'url'		=> $GLOBALS['phpgw']->link('/tts/index.php'))
	);
	display_sidebox($appname,$menu_title,$file);

	if ($GLOBALS['phpgw_info']['user']['apps']['preferences'])
	{
		$menu_title = lang('Preferences');
		$file = Array(
			Array('text'	=> 'Preferences',
				'url'		=> $GLOBALS['phpgw']->link('/preferences/preferences.php','appname=tts')),
			Array('text'	=> 'Edit Categories',
				'url'		=> $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app='.$appname.'&cats_level=True&global_cats=True'))
		);
		display_sidebox($appname,$menu_title,$file);
	}

	if ($GLOBALS['phpgw_info']['user']['apps']['admin'])
	{
		$menu_title = lang('Administration');
		$file = Array(
			Array('text'	=> 'Site Configuration',
				'url'		=> $GLOBALS['phpgw']->link('/tts/admin.php')),
			Array('text'	=> 'Global Categories',
				'url'		=> $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=tts'))
		);
		display_sidebox($appname,$menu_title,$file);
	}
