From c5796a06901584ec5636c947231231e749b479b7 Mon Sep 17 00:00:00 2001 From: seek3r Date: Thu, 21 Dec 2000 09:51:24 +0000 Subject: [PATCH] added support for an about button --- phpgwapi/inc/phpgw_common.inc.php | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/phpgwapi/inc/phpgw_common.inc.php b/phpgwapi/inc/phpgw_common.inc.php index 18308a010e..e304502ab0 100644 --- a/phpgwapi/inc/phpgw_common.inc.php +++ b/phpgwapi/inc/phpgw_common.inc.php @@ -320,7 +320,7 @@ { global $phpgw_info, $colspan, $phpgw; - if ($appname && (($appname=="home" || $appname=="logout" || $appname == "print" || $appname == "preferences") + if ($appname && (($appname=="home" || $appname=="logout" || $appname == "print" || $appname == "preferences" || $appname == "about") || ($phpgw_info["user"]["apps"][$appname]))) { if (isset($phpgw_info["flags"]["navbar_target"]) && $phpgw_info["flags"]["navbar_target"]) { @@ -345,11 +345,13 @@ $urlbasename = $phpgw_info["server"]["webserver_url"]; if ($appname == "home") { - $output_text = "link($urlbasename."/index.php"); + $output_text = "link($urlbasename."/index.php"); } elseif ($appname == "logout") { - $output_text = "link($urlbasename."/logout.php"); - } elseif ($appname == "print") { - $output_text = "link($urlbasename."/logout.php"); + } elseif ($appname == "about") { + $output_text = "link($urlbasename."/".$phpgw_info["flags"]["currentapp"]."/about.php"); + } elseif ($appname == "print") { + $output_text = "link($phpgw_info["server"]["webserver_url"] . "/".$phpgw_info["flags"]["currentapp"]."/about.php"); + if ($PHP_SELF == $phpgw_info["server"]["webserver_url"] . "/".$phpgw_info["flags"]["currentapp"]."/index.php") { + $selected = $i; + } + $i++; + } + $tabs[$i]["label"] = "logout"; $tabs[$i]["link"] = $phpgw->link($phpgw_info["server"]["webserver_url"] . "/logout.php"); @@ -471,6 +482,10 @@ } $this->show_icon(&$tpl,$td_width,"preferences","Preferences"); + if (file_exists($phpgw_info["server"]["app_root"]."/about.php")) { + $this->show_icon(&$tpl,$td_width,"about","About"); + } + $this->show_icon(&$tpl,$td_width,"logout","Logout"); } // end else