From 9952a1bdb8339d8dc7cfed00f49a4b0f6d06ba3e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 13 Jun 2004 20:09:27 +0000 Subject: [PATCH] app_header in the page-/window-title allows general popups to customize it and is more informativ then just the app-name --- phpgwapi/templates/default/head.inc.php | 14 ++++++++++---- phpgwapi/templates/edge-it/head.inc.php | 14 ++++++++++---- phpgwapi/templates/idots/head.inc.php | 14 ++++++++++---- phpgwapi/templates/idsociety/head.inc.php | 14 ++++++++++---- phpgwapi/templates/jerryr/head.inc.php | 14 ++++++++++---- phpgwapi/templates/literati/head.inc.php | 14 ++++++++++---- 6 files changed, 60 insertions(+), 24 deletions(-) diff --git a/phpgwapi/templates/default/head.inc.php b/phpgwapi/templates/default/head.inc.php index eee7ea5df6..668965fcac 100644 --- a/phpgwapi/templates/default/head.inc.php +++ b/phpgwapi/templates/default/head.inc.php @@ -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(), diff --git a/phpgwapi/templates/edge-it/head.inc.php b/phpgwapi/templates/edge-it/head.inc.php index e659f116b7..e97c89e7d6 100644 --- a/phpgwapi/templates/edge-it/head.inc.php +++ b/phpgwapi/templates/edge-it/head.inc.php @@ -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(), diff --git a/phpgwapi/templates/idots/head.inc.php b/phpgwapi/templates/idots/head.inc.php index e659f116b7..01f03d8d1e 100644 --- a/phpgwapi/templates/idots/head.inc.php +++ b/phpgwapi/templates/idots/head.inc.php @@ -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(), diff --git a/phpgwapi/templates/idsociety/head.inc.php b/phpgwapi/templates/idsociety/head.inc.php index 8f2953268f..b584e9881c 100644 --- a/phpgwapi/templates/idsociety/head.inc.php +++ b/phpgwapi/templates/idsociety/head.inc.php @@ -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(), diff --git a/phpgwapi/templates/jerryr/head.inc.php b/phpgwapi/templates/jerryr/head.inc.php index 683f3af296..8692ca5c19 100644 --- a/phpgwapi/templates/jerryr/head.inc.php +++ b/phpgwapi/templates/jerryr/head.inc.php @@ -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(), diff --git a/phpgwapi/templates/literati/head.inc.php b/phpgwapi/templates/literati/head.inc.php index 7ea2b9708d..b1812a3f3d 100644 --- a/phpgwapi/templates/literati/head.inc.php +++ b/phpgwapi/templates/literati/head.inc.php @@ -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(),