2006-12-11 00:44:18 +01:00
|
|
|
<?php
|
|
|
|
/**
|
2011-08-31 09:50:28 +02:00
|
|
|
* EGroupware jerryr template set
|
|
|
|
*
|
2006-12-11 00:44:18 +01:00
|
|
|
* @link http://www.egroupware.org
|
2011-08-31 09:50:28 +02:00
|
|
|
* @author Jerry Ruhe <jerry.ruhe@dilawri-group.ca>
|
2006-12-11 00:44:18 +01:00
|
|
|
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de> rewrite in 12/2006
|
|
|
|
* @author Pim Snel <pim@lingewoud.nl> author of the idots template set
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
|
|
* @package api
|
|
|
|
* @subpackage framework
|
|
|
|
* @access public
|
|
|
|
* @version $Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
require_once(EGW_SERVER_ROOT.'/phpgwapi/templates/idots/class.idots_framework.inc.php');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* eGW jerryr template
|
|
|
|
*/
|
|
|
|
class jerryr_framework extends idots_framework
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Constructor, calls the contstructor of the extended class
|
|
|
|
*
|
|
|
|
* @param string $template='jerryr'
|
|
|
|
* @return jerryr_framework
|
|
|
|
*/
|
2011-08-31 09:50:28 +02:00
|
|
|
function __construct($template='jerryr')
|
2006-12-11 00:44:18 +01:00
|
|
|
{
|
2011-08-31 09:50:28 +02:00
|
|
|
parent::__construct($template);
|
2006-12-11 00:44:18 +01:00
|
|
|
}
|
2007-01-05 15:15:23 +01:00
|
|
|
|
2012-07-24 08:19:16 +02:00
|
|
|
/**
|
|
|
|
* Check if current user agent is supported
|
|
|
|
*
|
|
|
|
* Currently we do NOT support:
|
|
|
|
* - iPhone, iPad, Android, SymbianOS due to iframe scrolling problems of Webkit
|
|
|
|
*
|
|
|
|
* @return boolean
|
|
|
|
*/
|
|
|
|
public static function is_supported_user_agent()
|
|
|
|
{
|
|
|
|
if (html::$ua_mobile)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Display the string with html of the topmenu if its enabled
|
|
|
|
*
|
|
|
|
* @param array $vars
|
|
|
|
* @param array $apps
|
|
|
|
* @return string
|
|
|
|
*/
|
2012-03-04 14:33:10 +01:00
|
|
|
function topmenu(array $vars,array $apps)
|
2007-01-13 05:15:30 +01:00
|
|
|
{
|
2007-11-22 09:29:16 +01:00
|
|
|
$this->tplsav2->menuitems = array();
|
|
|
|
$this->tplsav2->menuinfoitems = array();
|
2007-01-13 05:15:30 +01:00
|
|
|
|
2008-08-11 09:28:10 +02:00
|
|
|
if($GLOBALS['egw_info']['user']['apps']['home'] && isset($apps['home']))
|
|
|
|
{
|
|
|
|
$this->_add_topmenu_item($apps['home']);
|
|
|
|
}
|
2007-11-22 09:29:16 +01:00
|
|
|
/*if($GLOBALS['egw_info']['user']['apps']['manual'])
|
|
|
|
{
|
|
|
|
$this->_add_topmenu_item('manual');
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
if($GLOBALS['egw_info']['user']['apps']['preferences'])
|
|
|
|
{
|
2008-08-07 13:13:54 +02:00
|
|
|
$this->_add_topmenu_item($apps['preferences']);
|
2007-11-22 09:29:16 +01:00
|
|
|
}
|
2008-08-11 09:28:10 +02:00
|
|
|
if($GLOBALS['egw_info']['user']['apps']['manual'] && isset($apps['manual']))
|
2007-01-18 05:48:18 +01:00
|
|
|
{
|
2008-08-07 13:13:54 +02:00
|
|
|
$this->_add_topmenu_item($apps['manual']);
|
2007-01-18 05:48:18 +01:00
|
|
|
}
|
2007-11-22 09:29:16 +01:00
|
|
|
//$this->_add_topmenu_item('about',lang('About %1',$GLOBALS['egw_info']['apps'][$GLOBALS['egw_info']['flags']['currentapp']]['title']));
|
2008-08-07 13:13:54 +02:00
|
|
|
$this->_add_topmenu_item($apps['logout']);
|
2007-01-13 05:15:30 +01:00
|
|
|
|
2007-11-22 09:29:16 +01:00
|
|
|
$this->tplsav2->assign('info_icons',$this->topmenu_icon_arr);
|
2007-01-13 05:15:30 +01:00
|
|
|
|
2007-11-22 09:29:16 +01:00
|
|
|
if($GLOBALS['egw_info']['user']['apps']['notifications'])
|
|
|
|
{
|
|
|
|
$this->_add_topmenu_info_item($this->_get_notification_bell());
|
|
|
|
}
|
2008-08-07 13:13:54 +02:00
|
|
|
$this->_add_topmenu_info_item($vars['user_info']);
|
|
|
|
$this->_add_topmenu_info_item($vars['current_users']);
|
|
|
|
$this->_add_topmenu_info_item($vars['quick_add']);
|
2007-01-13 05:15:30 +01:00
|
|
|
|
2007-11-22 09:29:16 +01:00
|
|
|
$this->tplsav2->display('topmenu.tpl.php');
|
|
|
|
}
|
2006-12-11 00:44:18 +01:00
|
|
|
}
|