fixed bug reported on the german list: infolog priority (color) was not shown on homepage - app.css file was not loaded

This commit is contained in:
Ralf Becker 2005-11-27 18:24:30 +00:00
parent 77193a8839
commit d127e029da

View File

@ -1,6 +1,6 @@
<?php
/**************************************************************************\
* eGroupWare - Info Log administration *
* eGroupWare - Info Log on Homepage *
* http://www.egroupware.org *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
@ -10,8 +10,7 @@
\**************************************************************************/
/* $Id$ */
$showevents = intval($GLOBALS['egw_info']['user']['preferences']['infolog']['homeShowEvents']);
if($showevents > 0)
if (($showevents = (int) $GLOBALS['egw_info']['user']['preferences']['infolog']['homeShowEvents']) > 0)
{
$save_app = $GLOBALS['egw_info']['flags']['currentapp'];
$GLOBALS['egw_info']['flags']['currentapp'] = 'infolog';
@ -34,11 +33,8 @@
break;
}*/
$title = lang('InfoLog').' - '.lang($infolog->filters['own-open-today']);
$xslt = $infolog->tmpl->xslt;
unset($infolog);
if(!$xslt) // .14/6
{
$portalbox =& CreateObject('phpgwapi.listbox',array(
'title' => $title,
'primary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
@ -54,17 +50,20 @@
}
$portalbox->data = $data;
echo "\n<!-- BEGIN InfoLog info -->\n".$portalbox->draw($html)."\n<!-- END InfoLog info -->\n";
unset($portalbox);
}
else // HEAD / XSLT
if (!file_exists(EGW_SERVER_ROOT.($css_file ='/infolog/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/app.css')))
{
$GLOBALS['egw']->portalbox->set_params(array(
'app_id' => $app_id,
'title' => $title
));
$GLOBALS['egw']->portalbox->draw($html);
$css_file = '/infolog/templates/default/app.css';
}
echo '
<!-- BEGIN InfoLog info -->
<style type="text/css">
<!--
@import url('.$GLOBALS['egw_info']['server']['webserver_url'].$css_file.');
-->
</style>
'. $portalbox->draw($html)."\n<!-- END InfoLog info -->\n";
unset($portalbox);
unset($html);
$GLOBALS['egw_info']['flags']['currentapp'] = $save_app;
}