fixed calendar to be printer friendly

This commit is contained in:
skeeter 2001-01-11 01:10:08 +00:00
parent be3d70940f
commit 327588521e
8 changed files with 35 additions and 12 deletions

View File

@ -18,7 +18,9 @@
if (isset($friendly) && $friendly){
$phpgw_info["flags"]["noheader"] = True;
$phpgw_info["flags"]["nonavbar"] = True;
$phpgw_info["flags"]["nocalendarheader"] = True;
$phpgw_info["flags"]["noappheader"] = True;
$phpgw_info["flags"]["noappfooter"] = True;
$phpgw_info["flags"]["nofooter"] = True;
} else {
$friendly = 0;
}
@ -88,7 +90,7 @@
$phpgw->template->set_var("small_calendar",$phpgw->calendar->pretty_small_calendar($now["day"],$now["month"],$now["year"],"day.php"));
if (!$friendly) {
$param = 'year='.$thisyear.'&month='.$thismonth.'&friendly=1&filter='.$filter;
$param = 'year='.$thisyear.'&month='.$thismonth.'&day='.$thisday.'&friendly=1&filter='.$filter;
$phpgw->template->set_var("print","<a href=\"".$phpgw->link("",$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang("Generate printer-friendly version")."'\">[".lang("Printer Friendly")."]</A>");
$phpgw->template->parse("out","day_t");
$phpgw->template->pparse("out","day_t");

View File

@ -1099,10 +1099,16 @@
$p->set_var('dayname',$str);
}
} else {
$p->set_var('bgcolor2','#FEFEFE');
$p->set_var('dayname','<a href="'.$phpgw->link($phpgw_info["server"]["webserver_url"]
. '/calendar/'.$link,'year='.$cal["year"].'&month='.$cal["month"].'&day='
. $cal["day"]).'" class="minicalendargrey">' . $cal["day"] . "</a>");
$p->set_var('bgcolor2','#FEFEFE');
$str = "";
if(!$this->printer_friendly) {
$str .= '<a href="'.$phpgw->link($phpgw_info["server"]["webserver_url"]
. '/calendar/'.$link,'year='.$cal["year"].'&month='.$cal["month"].'&day='
. $cal["day"]).'" class="minicalendargrey">';
}
$str .= $cal["day"];
if (!$this->printer_friendly) $str .= '</a>';
$p->set_var('dayname',$str);
}
$p->parse('monthweek_day','mini_day',True);
}

View File

@ -18,7 +18,9 @@
if (isset($friendly) && $friendly){
$phpgw_info["flags"]["noheader"] = True;
$phpgw_info["flags"]["nonavbar"] = True;
$phpgw_info["flags"]["nocalendarheader"] = True;
$phpgw_info["flags"]["noappheader"] = True;
$phpgw_info["flags"]["noappfooter"] = True;
$phpgw_info["flags"]["nofooter"] = True;
} else {
$friendly = 0;
}

View File

@ -18,7 +18,9 @@
if (isset($friendly) && $friendly){
$phpgw_info["flags"]["noheader"] = True;
$phpgw_info["flags"]["nonavbar"] = True;
// $phpgw_info["flags"]["nocalendarheader"] = True;
$phpgw_info["flags"]["noappheader"] = True;
$phpgw_info["flags"]["noappfooter"] = True;
$phpgw_info["flags"]["nofooter"] = True;
} else {
$friendly = 0;
}

View File

@ -12,13 +12,17 @@
/* $Id$ */
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_nextmatchs_class" => True);
if (isset($friendly) && $friendly){
$phpgw_info["flags"]["noheader"] = True;
$phpgw_info["flags"]["nonavbar"] = True;
$phpgw_info["flags"]["noappheader"] = True;
$phpgw_info["flags"]["noappfooter"] = True;
$phpgw_info["flags"]["nofooter"] = True;
} else {
$friendly = 0;
}
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_nextmatchs_class" => True);
include("../header.inc.php");
$view = "year";

View File

@ -1,4 +1,7 @@
[0.9.10] - Fixed the cron programs, they where out of date in the table structures
- Added the ["flags"]["nofooter"] . ["flags"]["noappfooter"] flags.
- Fixed calendars in Printer Friendly mode.
- Fixed calendar day-view with events spanning multiple hours.
[0.9.9] - Fixed a number of issues with the verdilak layout
- Fixed parse_footer() not working if the header is turned off.

View File

@ -24,7 +24,8 @@
if (file_exists ($phpgw_info["server"]["app_inc"]."/footer.inc.php")
&& $phpgw_info["flags"]["currentapp"] != "home"
&& $phpgw_info["flags"]["currentapp"] != "login"
&& $phpgw_info["flags"]["currentapp"] != "logout"){
&& $phpgw_info["flags"]["currentapp"] != "logout"
&& (!isset($phpgw_info["flags"]["noappfooter"]) || !$phpgw_info["flags"]["noappfooter"])) {
include($phpgw_info["server"]["app_inc"]."/footer.inc.php");
}

View File

@ -509,7 +509,10 @@
function phpgw_footer()
{
global $phpgw, $phpgw_info, $HTMLCOMPLAINT;
include($phpgw_info["server"]["api_inc"] . "/footer.inc.php");
if (!isset($phpgw_info["flags"]["nofooter"]) || !$phpgw_info["flags"]["nofooter"]) {
include($phpgw_info["server"]["api_inc"] . "/footer.inc.php");
}
// Clean up mcrypt
if (is_object($this->crypto)) {