mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 20:40:14 +01:00
added templates selection
This commit is contained in:
parent
03c74ae484
commit
83de0f612d
@ -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 = ""){
|
function get_tpl_dir($appname = ""){
|
||||||
global $phpgw_info;
|
global $phpgw_info;
|
||||||
if ($appname == ""){$appname = $phpgw_info["flags"]["currentapp"];}
|
if ($appname == ""){$appname = $phpgw_info["flags"]["currentapp"];}
|
||||||
|
@ -33,6 +33,21 @@
|
|||||||
echo $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]; ?>" size="2">
|
echo $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]; ?>" size="2">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Interface/Template Selection:<br></td>
|
||||||
|
<td>
|
||||||
|
<select name="$selected[$phpgw_info["user"]["preferences"]["common"]["template_set"]]">
|
||||||
|
<?php
|
||||||
|
$templates = $phpgw->common->list_templates();
|
||||||
|
while (list ($key, $value) = each ($templates)){
|
||||||
|
echo '<option value="'.$key.'" '.$selected[$key].'>'.$templates[$key]["title"].'</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo lang("Show navigation bar as"); ?>: </td>
|
<td><?php echo lang("Show navigation bar as"); ?>: </td>
|
||||||
<td>
|
<td>
|
||||||
|
Loading…
Reference in New Issue
Block a user