Added support for display the navbar on top or bottom when using frames

This commit is contained in:
jengo 2000-12-11 10:02:30 +00:00
parent a052584cc7
commit c28ab79afd
2 changed files with 28 additions and 2 deletions

View File

@ -29,11 +29,23 @@
if (! $navbarframe && ! $framebody) {
$tpl = new Template($phpgw_info["server"]["template_dir"]);
$tpl->set_file(array("frames" => "frames.tpl"));
$tpl->set_file(array("frames" => "frames.tpl",
"frame_body" => "frames_body.tpl",
"frame_navbar" => "frames_navbar.tpl"
));
$tpl->set_var("navbar_link",$phpgw->link("index.php?navbarframe=True"));
$tpl->set_var("body_link",$phpgw->link("index.php?framebody=True"));
if ($phpgw_info["user"]["preferences"]["common"]["frame_navbar_location"] == "bottom") {
$tpl->set_var("frame_size","*,60");
$tpl->parse("frames_","frame_body",True);
$tpl->parse("frames_","frame_navbar",True);
} else {
$tpl->set_var("frame_size","60,*");
$tpl->parse("frames_","frame_navbar",True);
$tpl->parse("frames_","frame_body",True);
}
$tpl->pparse("out","frames");
}
if ($navbarframe) {

View File

@ -56,6 +56,20 @@
</tr>
<?php
}
if ($phpgw_info["server"]["useframes"] == "always") {
?>
<tr>
<td><?php echo lang("Navigation bar frame location"); ?>: </td>
<td>
<?php $selected[$phpgw_info["user"]["preferences"]["common"]["frame_navbar_location"]] = " selected"; ?>
<select name="settings[frame_navbar_location]">
<option value="top"<?php echo $selected["top"] . ">" . lang("Top"); ?></option>
<option value="bottom"<?php echo $selected["bottom"] . ">" . lang("bottom"); ?></option>
</select>
</td>
</tr>
<?php
}
?>
<tr>
@ -213,7 +227,7 @@
$phpgw->db->unlock();
if ($settings["useframes"]) {
if ($phpgw_info["server"]["useframes"] != "never") {
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/index.php"));
exit;
}