From 83de0f612d2216708531dadc45b0b2faf47a55f4 Mon Sep 17 00:00:00 2001 From: seek3r Date: Wed, 10 Jan 2001 00:53:30 +0000 Subject: [PATCH] added templates selection --- phpgwapi/inc/phpgw_common.inc.php | 20 ++++++++++++++++++++ preferences/settings.php | 15 +++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/phpgwapi/inc/phpgw_common.inc.php b/phpgwapi/inc/phpgw_common.inc.php index 565f13b5c6..f6cc26d6a1 100644 --- a/phpgwapi/inc/phpgw_common.inc.php +++ b/phpgwapi/inc/phpgw_common.inc.php @@ -331,6 +331,26 @@ } } + function list_templates(){ + global $phpgw_info; + $d = dir($phpgw_info["server"]["server_root"]."/phpgwapi/templates"); + while($entry=$d->read()) { + if ($entry != "CVS" && $entry != "." && $entry != ".."){ + $list[$entry]["name"] = $entry; + $f = $phpgw_info["server"]["server_root"]."/phpgwapi/templates/".$entry."/details.inc.php"; + if (file_exists ($f)){ + include($f); + $list[$entry]["title"] = "Use ".$phpgw_info["template"][$entry]["title"]."interface"; + }else{ + $list[$entry]["title"] = $entry; + } + } + } + $d->close(); + reset ($list); + return $list; + } + function get_tpl_dir($appname = ""){ global $phpgw_info; if ($appname == ""){$appname = $phpgw_info["flags"]["currentapp"];} diff --git a/preferences/settings.php b/preferences/settings.php index 2de90aba65..8e6f297a4e 100755 --- a/preferences/settings.php +++ b/preferences/settings.php @@ -33,6 +33,21 @@ echo $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]; ?>" size="2"> + + + Interface/Template Selection:
+ + + + + :