From 71c1959c40234d9768e5b7a89c49cab8f85d5851 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 30 Mar 2005 16:16:07 +0000 Subject: [PATCH] added language direction flag to the html tag for the idots and jerry template: it can be set now by translating the phrase 'language_direction_rtl' to 'rtl' for a specific language --- phpgwapi/templates/idots/head.inc.php | 17 +++++++++-------- phpgwapi/templates/idots/head.tpl | 2 +- phpgwapi/templates/jerryr/head.inc.php | 17 +++++++++-------- phpgwapi/templates/jerryr/head.tpl | 2 +- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/phpgwapi/templates/idots/head.inc.php b/phpgwapi/templates/idots/head.inc.php index 984ac5037e..a514de8e8a 100644 --- a/phpgwapi/templates/idots/head.inc.php +++ b/phpgwapi/templates/idots/head.inc.php @@ -55,7 +55,7 @@ '; } - $tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); + $tpl = CreateObject('phpgwapi.Template',EGW_TEMPLATE_DIR); $tpl->set_unknowns('remove'); $tpl->set_file(array('_head' => 'head.tpl')); $tpl->set_block('_head','head'); @@ -74,20 +74,21 @@ if($app!='wiki') $robots =''; $var = Array( - 'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico', - 'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico', + 'img_icon' => EGW_IMAGES_DIR . '/favicon.ico', + 'img_shortcut' => EGW_IMAGES_DIR . '/favicon.ico', 'pngfix' => $pngfix, 'slider_effects' => $slider_effects, 'simple_show_hide' => $simple_show_hide, 'lang_code' => $lang_code, - 'charset' => $GLOBALS['phpgw']->translation->charset(), + 'charset' => $GLOBALS['egw']->translation->charset(), 'font_family' => $GLOBALS['egw_info']['theme']['font'], 'website_title' => strip_tags($GLOBALS['egw_info']['server']['site_title']. ($app ? " [$app]" : '')), - 'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(), + 'body_tags' => $bodyheader .' '. $GLOBALS['egw']->common->get_body_attribs(), 'theme_css' => $theme_css, - 'css' => $GLOBALS['phpgw']->common->get_css(), - 'java_script' => $GLOBALS['phpgw']->common->get_java_script(), - 'meta_robots' => $robots + 'css' => $GLOBALS['egw']->common->get_css(), + 'java_script' => $GLOBALS['egw']->common->get_java_script(), + 'meta_robots' => $robots, + 'dir_code' => lang('language_direction_rtl') != 'rtl' ? '' : ' dir="rtl"', ); $tpl->set_var($var); $tpl->pfp('out','head'); diff --git a/phpgwapi/templates/idots/head.tpl b/phpgwapi/templates/idots/head.tpl index e8fd76bac1..f5b5d0d491 100644 --- a/phpgwapi/templates/idots/head.tpl +++ b/phpgwapi/templates/idots/head.tpl @@ -1,5 +1,5 @@ - + {website_title} diff --git a/phpgwapi/templates/jerryr/head.inc.php b/phpgwapi/templates/jerryr/head.inc.php index 08150bd344..80b64edbce 100644 --- a/phpgwapi/templates/jerryr/head.inc.php +++ b/phpgwapi/templates/jerryr/head.inc.php @@ -12,7 +12,7 @@ /* $Id$ */ // get used language code - $lang_code = 'en'; + $lang_code = $GLOBALS['egw_info']['user']['preferences']['common']['lang']; $bodyheader = ' bgcolor="' . $GLOBALS['egw_info']['theme']['bg_color'] . '" alink="' . $GLOBALS['egw_info']['theme']['alink'] . '" link="' . $GLOBALS['egw_info']['theme']['link'] . '" vlink="' @@ -59,7 +59,7 @@ $foldertree_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/js/foldertree/foldertree.js'; $js_foldertree = ''; - $tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); + $tpl = CreateObject('phpgwapi.Template',EGW_TEMPLATE_DIR); $tpl->set_unknowns('remove'); $tpl->set_file(array('_head' => 'head.tpl')); $tpl->set_block('_head','head'); @@ -74,20 +74,21 @@ $app = isset($GLOBALS['egw_info']['apps'][$app]) ? $GLOBALS['egw_info']['apps'][$app]['title'] : lang($app); } $var = Array( - 'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico', - 'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico', + 'img_icon' => EGW_IMAGES_DIR . '/favicon.ico', + 'img_shortcut' => EGW_IMAGES_DIR . '/favicon.ico', 'pngfix' => $pngfix, 'slider_effects'=> $slider_effects, 'simple_show_hide'=> $simple_show_hide, 'lang_code'=> $lang_code, - 'charset' => $GLOBALS['phpgw']->translation->charset(), + 'charset' => $GLOBALS['egw']->translation->charset(), 'font_family' => $GLOBALS['egw_info']['theme']['font'], 'website_title' => $GLOBALS['egw_info']['server']['site_title'] . ($app ? " [$app]" : ''), - 'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(), + 'body_tags' => $bodyheader .' '. $GLOBALS['egw']->common->get_body_attribs(), 'theme_css' => $theme_css, - 'css' => $GLOBALS['phpgw']->common->get_css(), - 'java_script' => $GLOBALS['phpgw']->common->get_java_script(), + 'css' => $GLOBALS['egw']->common->get_css(), + 'java_script' => $GLOBALS['egw']->common->get_java_script(), 'js_foldertree' => $js_foldertree, + 'dir_code' => lang('language_direction_rtl') != 'rtl' ? '' : ' dir="rtl"', ); $tpl->set_var($var); $tpl->pfp('out','head'); diff --git a/phpgwapi/templates/jerryr/head.tpl b/phpgwapi/templates/jerryr/head.tpl index b6e4144929..b2c6f92250 100644 --- a/phpgwapi/templates/jerryr/head.tpl +++ b/phpgwapi/templates/jerryr/head.tpl @@ -1,5 +1,5 @@ - + {website_title}