mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
This is for feature request #414427. This adds a preference for printing in black & white.
This commit is contained in:
parent
cdd707d2ea
commit
9325c7c46d
@ -1003,11 +1003,19 @@ class calendar extends calendar_
|
||||
$p->set_file($templates);
|
||||
$p->set_block('month_header','monthly_header','monthly_header');
|
||||
$p->set_block('month_header','column_title','column_title');
|
||||
|
||||
|
||||
$var = Array(
|
||||
'bgcolor' => $phpgw_info['theme']['th_bg'],
|
||||
'font_color' => $phpgw_info['theme']['th_text']
|
||||
);
|
||||
if($this->printer_friendly && @$phpgw_info['user']['preferences']['calendar']['print_black_white'])
|
||||
{
|
||||
$var = Array(
|
||||
'bgcolor' => '',
|
||||
'font_color' => ''
|
||||
);
|
||||
}
|
||||
|
||||
$p->set_var($var);
|
||||
|
||||
$p->set_var('col_width','14');
|
||||
@ -1118,6 +1126,10 @@ class calendar extends calendar_
|
||||
else
|
||||
{
|
||||
$day_number = $day;
|
||||
if(@$phpgw_info['user']['preferences']['calendar']['print_black_white'])
|
||||
{
|
||||
$extra = '';
|
||||
}
|
||||
}
|
||||
|
||||
$var = Array(
|
||||
|
@ -75,6 +75,16 @@
|
||||
{
|
||||
$phpgw->preferences->delete('calendar','display_minicals');
|
||||
}
|
||||
|
||||
if ($print_black_white == True)
|
||||
{
|
||||
$phpgw->preferences->add('calendar','print_black_white');
|
||||
}
|
||||
else
|
||||
{
|
||||
$phpgw->preferences->delete('calendar','print_black_white');
|
||||
}
|
||||
|
||||
$phpgw->preferences->save_repository(True);
|
||||
|
||||
Header('Location: '.$phpgw->link('/preferences/index.php'));
|
||||
@ -221,6 +231,9 @@
|
||||
$str = '<input type="checkbox" name="display_minicals" value="True"'.($phpgw_info['user']['preferences']['calendar']['display_minicals'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['display_minicals'] == True?' checked':'').'>';
|
||||
display_item(lang('Display mini calendars when printing'),$str);
|
||||
|
||||
$str = '<input type="checkbox" name="print_black_white" value="True"'.($phpgw_info['user']['preferences']['calendar']['print_black_white'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['print_black_white'] == True?' checked':'').'>';
|
||||
display_item(lang('Print calendars in black & white'),$str);
|
||||
|
||||
$p->pparse('out','pref');
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user