diff --git a/phpgwapi/templates/justweb/head.inc.php b/phpgwapi/templates/justweb/head.inc.php index 53988460d1..af32f20425 100644 --- a/phpgwapi/templates/justweb/head.inc.php +++ b/phpgwapi/templates/justweb/head.inc.php @@ -11,16 +11,29 @@ /* $Id$ */ - if ($phpgw_info["server"]["htmlcompliant"]) { - $bodyheader = "BGCOLOR=\"".$phpgw_info["theme"]["bg_color"]."\" ALINK=\"".$phpgw_info["theme"]["alink"]."\" LINK=\"".$phpgw_info["theme"]["link"]."\" VLINK=\"".$phpgw_info["theme"]["vlink"]."\""; - } else { - $bodyheader = "BGCOLOR=\"".$phpgw_info["theme"]["bg_color"]."\""; - } + if ($phpgw_info["server"]["htmlcompliant"]) + { + $bodyheader = "BGCOLOR=\"".$phpgw_info["theme"]["bg_color"]."\" ALINK=\"".$phpgw_info["theme"]["alink"]."\" LINK=\"".$phpgw_info["theme"]["link"]."\" VLINK=\"".$phpgw_info["theme"]["vlink"]."\""; + } + else + { + $bodyheader = "BGCOLOR=\"".$phpgw_info["theme"]["bg_color"]."\""; + } + + $tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); + $tpl->set_unknowns("remove"); + $tpl->set_file(array("head" => "head.tpl")); + + $tpl->set_var("webserver_url", $phpgw_info["server"]["webserver_url"]); + $tpl->set_var("home",$phpgw->link('/')); + $tpl->set_var("appt",$phpgw->link('/calendar/day.php')); + $tpl->set_var("todo",$phpgw->link('/todo/add.php')); + $tpl->set_var("prefs",$phpgw->link('/preferences')); + $tpl->set_var("email",$phpgw->link('/email/preferences.php')); + $tpl->set_var("calendar",$phpgw->link('/calendar/preferences.php')); + $tpl->set_var("addressbook",$phpgw->link('/addressbook/preferences.php')); + + $tpl->set_var("website_title", $phpgw_info["server"]["site_title"]); + $tpl->set_var("body_tags",$bodyheader); + echo $tpl->finish($tpl->parse("out","head")); - $tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); - $tpl->set_unknowns("remove"); - $tpl->set_file(array("head" => "head.tpl")); - $tpl->set_var("webserver_url", $phpgw_info["server"]["webserver_url"]); - $tpl->set_var("website_title", $phpgw_info["server"]["site_title"]); - $tpl->set_var("body_tags",$bodyheader); - echo $tpl->finish($tpl->parse("out","head")); diff --git a/phpgwapi/templates/justweb/head.tpl b/phpgwapi/templates/justweb/head.tpl index ae54c49dcf..5c389b7c6d 100644 --- a/phpgwapi/templates/justweb/head.tpl +++ b/phpgwapi/templates/justweb/head.tpl @@ -30,26 +30,26 @@ var dhtmlMenu; //add more menus simply by adding more "blocks" of same code below dhtmlMenu = new NavBarMenu(60, 120); -dhtmlMenu.addItem(new NavBarMenuItem("Home", "{webserver_url}/")); +dhtmlMenu.addItem(new NavBarMenuItem("Home", "{home}")); myNavBar1.addMenu(dhtmlMenu); dhtmlMenu = new NavBarMenu(60, 140); dhtmlMenu.addItem(new NavBarMenuItem("Edit", "")); -dhtmlMenu.addItem(new NavBarMenuItem("Add new Appointment", "{webserver_url}/calendar/day.php")); -dhtmlMenu.addItem(new NavBarMenuItem("Add new Todo", "{webserver_url}/todo/add.php")); +dhtmlMenu.addItem(new NavBarMenuItem("Add new Appointment", "{appt}")); +dhtmlMenu.addItem(new NavBarMenuItem("Add new Todo", "{todo}")); myNavBar1.addMenu(dhtmlMenu); dhtmlMenu = new NavBarMenu(125, 140); dhtmlMenu.addItem(new NavBarMenuItem("Preferences", "")); -dhtmlMenu.addItem(new NavBarMenuItem("General", "{webserver_url}/preferences")); -dhtmlMenu.addItem(new NavBarMenuItem("Email", "{webserver_url}/email/preferences.php")); -dhtmlMenu.addItem(new NavBarMenuItem("Calendar", "{webserver_url}/calendar/preferences.php")); -dhtmlMenu.addItem(new NavBarMenuItem("Addressbook", "{webserver_url}/addressbook/preferences.php")); +dhtmlMenu.addItem(new NavBarMenuItem("General", "{prefs}")); +dhtmlMenu.addItem(new NavBarMenuItem("Email", "{email}")); +dhtmlMenu.addItem(new NavBarMenuItem("Calendar", "{calendar}")); +dhtmlMenu.addItem(new NavBarMenuItem("Addressbook", "{addressbook}")); myNavBar1.addMenu(dhtmlMenu); dhtmlMenu = new NavBarMenu(62, 120); dhtmlMenu.addItem(new NavBarMenuItem("Help", "")); -dhtmlMenu.addItem(new NavBarMenuItem("General", "/")); +dhtmlMenu.addItem(new NavBarMenuItem("General", "")); myNavBar1.addMenu(dhtmlMenu); //set menu colors