app_header in the page-/window-title allows general popups to customize it and is more informativ then just the app-name

This commit is contained in:
Ralf Becker 2004-06-13 20:09:27 +00:00
parent cc61a1940b
commit 9952a1bdb8
6 changed files with 60 additions and 24 deletions

View File

@ -22,15 +22,21 @@
$tpl->set_file(array('_head' => 'head.tpl'));
$tpl->set_block('_head','head');
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
if ($GLOBALS['phpgw_info']['flags']['app_header'])
{
$app = $GLOBALS['phpgw_info']['flags']['app_header'];
}
else
{
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app);
}
$var = Array (
'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico',
'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico',
'charset' => $GLOBALS['phpgw']->translation->charset(),
'font_family' => $GLOBALS['phpgw_info']['theme']['font'],
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'] . $app,
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'] . ($app ? " [$app]" : ''),
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
'css' => $GLOBALS['phpgw']->common->get_css(),
'java_script' => $GLOBALS['phpgw']->common->get_java_script(),

View File

@ -67,9 +67,15 @@
$tpl->set_file(array('_head' => 'head.tpl'));
$tpl->set_block('_head','head');
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
if ($GLOBALS['phpgw_info']['flags']['app_header'])
{
$app = $GLOBALS['phpgw_info']['flags']['app_header'];
}
else
{
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app);
}
$var = Array(
'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico',
'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico',
@ -79,7 +85,7 @@
'lang_code'=> $lang_code,
'charset' => $GLOBALS['phpgw']->translation->charset(),
'font_family' => $GLOBALS['phpgw_info']['theme']['font'],
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'] . ($app ? " [$app]" : ''),
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
'theme_css' => $theme_css,
'css' => $GLOBALS['phpgw']->common->get_css(),

View File

@ -67,9 +67,15 @@
$tpl->set_file(array('_head' => 'head.tpl'));
$tpl->set_block('_head','head');
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
if ($GLOBALS['phpgw_info']['flags']['app_header'])
{
$app = $GLOBALS['phpgw_info']['flags']['app_header'];
}
else
{
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app);
}
$var = Array(
'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico',
'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico',
@ -79,7 +85,7 @@
'lang_code'=> $lang_code,
'charset' => $GLOBALS['phpgw']->translation->charset(),
'font_family' => $GLOBALS['phpgw_info']['theme']['font'],
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
'website_title' => $GLOBALS['phpgw_info']['server']['site_title']. ($app ? " [$app]" : ''),
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
'theme_css' => $theme_css,
'css' => $GLOBALS['phpgw']->common->get_css(),

View File

@ -13,9 +13,15 @@
$bodyheader = 'bgcolor="'.$GLOBALS['phpgw_info']['theme']['bg_color'].'" alink="'.$GLOBALS['phpgw_info']['theme']['alink'].'" link="'.$GLOBALS['phpgw_info']['theme']['link'].'" vlink="'.$GLOBALS['phpgw_info']['theme']['vlink'].'"';
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
if ($GLOBALS['phpgw_info']['flags']['app_header'])
{
$app = $GLOBALS['phpgw_info']['flags']['app_header'];
}
else
{
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app);
}
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
$tpl->set_unknowns('remove');
$tpl->set_file(array('head' => 'head.tpl'));
@ -24,7 +30,7 @@
'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico',
'charset' => $GLOBALS['phpgw']->translation->charset(),
'font_family' => $GLOBALS['phpgw_info']['theme']['font'],
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'] . $app,
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'] . . ($app ? " [$app]" : ''),
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
'css' => $GLOBALS['phpgw']->common->get_css(),
'java_script' => $GLOBALS['phpgw']->common->get_java_script(),

View File

@ -72,9 +72,15 @@
$tpl->set_file(array('_head' => 'head.tpl'));
$tpl->set_block('_head','head');
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
if ($GLOBALS['phpgw_info']['flags']['app_header'])
{
$app = $GLOBALS['phpgw_info']['flags']['app_header'];
}
else
{
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app);
}
$var = Array(
'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico',
'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico',
@ -84,7 +90,7 @@
'lang_code'=> $lang_code,
'charset' => $GLOBALS['phpgw']->translation->charset(),
'font_family' => $GLOBALS['phpgw_info']['theme']['font'],
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'] . ($app ? " [$app]" : ''),
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
'theme_css' => $theme_css,
'css' => $GLOBALS['phpgw']->common->get_css(),

View File

@ -29,15 +29,21 @@
$tpl->set_unknowns('remove');
$tpl->set_file(array('head' => 'head.tpl'));
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
if ($GLOBALS['phpgw_info']['flags']['app_header'])
{
$app = $GLOBALS['phpgw_info']['flags']['app_header'];
}
else
{
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app);
}
$var = Array (
'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico',
'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico',
'charset' => $GLOBALS['phpgw']->translation->charset(),
'font_family' => $GLOBALS['phpgw_info']['theme']['font'],
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'] . ($app ? " [$app]" : ''),
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
'theme_css' => $theme_css,
'css' => $GLOBALS['phpgw']->common->get_css(),