2001-01-01 19:49:28 +01:00
|
|
|
<?php
|
2005-11-09 00:15:14 +01:00
|
|
|
/**************************************************************************\
|
|
|
|
* eGroupWare - Calendar on Homepage *
|
|
|
|
* http://www.egroupware.org *
|
|
|
|
* Written and (c) 2004 by Ralf Becker <RalfBecker@outdoor-training.de> *
|
|
|
|
* -------------------------------------------- *
|
|
|
|
* 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. *
|
|
|
|
\**************************************************************************/
|
2001-01-17 13:35:43 +01:00
|
|
|
|
2005-11-09 00:15:14 +01:00
|
|
|
/* $Id$ */
|
2001-02-07 13:05:15 +01:00
|
|
|
|
2005-11-09 00:15:14 +01:00
|
|
|
if($GLOBALS['egw_info']['user']['preferences']['calendar']['mainscreen_showevents'])
|
|
|
|
{
|
|
|
|
$GLOBALS['egw']->translation->add_app('calendar');
|
|
|
|
|
|
|
|
$save_app_header = $GLOBALS['egw_info']['flags']['app_header'];
|
|
|
|
|
|
|
|
if ($GLOBALS['egw_info']['user']['preferences']['calendar']['defaultcalendar'] == 'listview')
|
2001-04-21 03:51:18 +02:00
|
|
|
{
|
2005-11-09 00:15:14 +01:00
|
|
|
$content =& ExecMethod('calendar.uilist.home');
|
2001-04-21 03:51:18 +02:00
|
|
|
}
|
2005-11-09 00:15:14 +01:00
|
|
|
else
|
2001-04-21 03:51:18 +02:00
|
|
|
{
|
2005-11-09 00:15:14 +01:00
|
|
|
$content =& ExecMethod('calendar.uiviews.home');
|
|
|
|
}
|
|
|
|
$portalbox =& CreateObject('phpgwapi.listbox',array(
|
|
|
|
'title' => $GLOBALS['egw_info']['flags']['app_header'],
|
|
|
|
'primary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
|
|
|
|
'secondary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
|
|
|
|
'tertiary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
|
|
|
|
'width' => '100%',
|
|
|
|
'outerborderwidth' => '0',
|
|
|
|
'header_background_image' => $GLOBALS['egw']->common->image('phpgwapi/templates/default','bg_filler')
|
|
|
|
));
|
|
|
|
$GLOBALS['egw_info']['flags']['app_header'] = $save_app_header;
|
|
|
|
unset($save_app_header);
|
2003-08-28 16:31:11 +02:00
|
|
|
|
2005-11-09 00:15:14 +01:00
|
|
|
$GLOBALS['portal_order'][] = $app_id = $GLOBALS['egw']->applications->name2id('calendar');
|
|
|
|
foreach(array('up','down','close','question','edit') as $key)
|
|
|
|
{
|
|
|
|
$portalbox->set_controls($key,Array('url' => '/set_box.php', 'app' => $app_id));
|
|
|
|
}
|
|
|
|
$portalbox->data = Array();
|
2003-08-28 16:31:11 +02:00
|
|
|
|
2005-11-09 00:15:14 +01:00
|
|
|
if (!file_exists(EGW_SERVER_ROOT.($css_file ='/calendar/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/app.css')))
|
|
|
|
{
|
|
|
|
$css_file = '/calendar/templates/default/app.css';
|
2004-01-04 01:47:37 +01:00
|
|
|
}
|
2005-11-09 00:15:14 +01:00
|
|
|
echo '
|
|
|
|
<!-- BEGIN Calendar info -->
|
|
|
|
<style type="text/css">
|
|
|
|
<!--
|
|
|
|
@import url('.$GLOBALS['egw_info']['server']['webserver_url'].$css_file.');
|
|
|
|
-->
|
|
|
|
</style>
|
|
|
|
'.$portalbox->draw($content)."\n".'<!-- END Calendar info -->'."\n";
|
|
|
|
|
|
|
|
unset($key);
|
|
|
|
unset($app_id);
|
|
|
|
unset($content);
|
|
|
|
unset($portalbox);
|
|
|
|
}
|