mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
Mini calendars are now a configurable option for printer friendly pages.
This commit is contained in:
parent
dc2b2bfc05
commit
168fa729e8
@ -54,11 +54,20 @@
|
|||||||
$printer = '';
|
$printer = '';
|
||||||
$param = 'year='.$thisyear.'&month='.$thismonth.'&day='.$thisday.'&friendly=1&filter='.$filter.'&owner='.$owner;
|
$param = 'year='.$thisyear.'&month='.$thismonth.'&day='.$thisday.'&friendly=1&filter='.$filter.'&owner='.$owner;
|
||||||
$print = '<a href="'.$phpgw->link('/calendar/day.php',$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>';
|
$print = '<a href="'.$phpgw->link('/calendar/day.php',$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>';
|
||||||
|
$minical = $phpgw->calendar->mini_calendar($thisday,$thismonth,$thisyear,'day.php');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$printer = '<body bgcolor="'.$phpgw_info['theme']['bg_color'].'">';
|
$printer = '<body bgcolor="'.$phpgw_info['theme']['bg_color'].'">';
|
||||||
$print = '';
|
$print = '';
|
||||||
|
if($phpgw_info['user']['preferences']['calendar']['display_minicals'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['display_minicals'])
|
||||||
|
{
|
||||||
|
$minical = $phpgw->calendar->mini_calendar($thisday,$thismonth,$thisyear,'day.php');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$minical = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$now = $phpgw->calendar->makegmttime(0, 0, 0, $thismonth, $thisday, $thisyear);
|
$now = $phpgw->calendar->makegmttime(0, 0, 0, $thismonth, $thisday, $thisyear);
|
||||||
@ -69,7 +78,7 @@
|
|||||||
'printer_friendly' => $printer,
|
'printer_friendly' => $printer,
|
||||||
'bg_text' => $phpgw_info['themem']['bg_text'],
|
'bg_text' => $phpgw_info['themem']['bg_text'],
|
||||||
'daily_events' => $phpgw->calendar->print_day_at_a_glance($now),
|
'daily_events' => $phpgw->calendar->print_day_at_a_glance($now),
|
||||||
'small_calendar' => $phpgw->calendar->mini_calendar($thisday,$thismonth,$thisyear,'day.php'),
|
'small_calendar' => $minical,
|
||||||
'date' => lang(date('F',$m)).' '.$thisday.', '.$thisyear,
|
'date' => lang(date('F',$m)).' '.$thisday.', '.$thisyear,
|
||||||
'username' => $phpgw->common->grab_owner_name($owner),
|
'username' => $phpgw->common->grab_owner_name($owner),
|
||||||
'print' => $print
|
'print' => $print
|
||||||
|
@ -800,7 +800,7 @@ class calendar extends calendar_
|
|||||||
$p->set_block('mini_calendar','mini_week','mini_week');
|
$p->set_block('mini_calendar','mini_week','mini_week');
|
||||||
$p->set_block('mini_calendar','mini_day','mini_day');
|
$p->set_block('mini_calendar','mini_day','mini_day');
|
||||||
|
|
||||||
if($this->printer_firendly == False)
|
if($this->printer_friendly == False)
|
||||||
{
|
{
|
||||||
$month = '<a href="' . $phpgw->link('/calendar/month.php','month='.date('m',$date['raw']).'&year='.date('Y',$date['raw']).'&owner='.$this->owner) . '" class="minicalendar">' . lang($phpgw->common->show_date($date['raw'],'F')).' '.$year . '</a>';
|
$month = '<a href="' . $phpgw->link('/calendar/month.php','month='.date('m',$date['raw']).'&year='.date('Y',$date['raw']).'&owner='.$this->owner) . '" class="minicalendar">' . lang($phpgw->common->show_date($date['raw'],'F')).' '.$year . '</a>';
|
||||||
}
|
}
|
||||||
@ -908,6 +908,7 @@ class calendar extends calendar_
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$dayname = '';
|
||||||
$holiday_found = $this->holidays->find_date($cal['raw']);
|
$holiday_found = $this->holidays->find_date($cal['raw']);
|
||||||
if($outside_month == True)
|
if($outside_month == True)
|
||||||
{
|
{
|
||||||
@ -919,15 +920,23 @@ class calendar extends calendar_
|
|||||||
{
|
{
|
||||||
$class = 'minicalgreyhol';
|
$class = 'minicalgreyhol';
|
||||||
}
|
}
|
||||||
$p->set_var('day_image','');
|
if(!$this->printer_friendly)
|
||||||
$p->set_var('dayname','<a href="'.$phpgw->link('/calendar/'.$link,'year='.$cal['year'].'&month='.$cal['month'].'&day='.$cal['day']).'" class="'.$class.'">'.$cal['day'].'</a>');
|
{
|
||||||
|
$dayname .= '<a href="'.$phpgw->link('/calendar/'.$link,'year='.$cal['year'].'&month='.$cal['month'].'&day='.$cal['day']).'" class="'.$class.'">';
|
||||||
|
}
|
||||||
|
$dayname .= $cal['day'];
|
||||||
|
|
||||||
|
if(!$this->printer_friendly)
|
||||||
|
{
|
||||||
|
$dayname .= '</a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
$var = Array(
|
||||||
$p->set_var('day_image','');
|
'day_image' => '',
|
||||||
// $p->set_var('bgcolor2','#FEFEFE');
|
'dayname' => $dayname
|
||||||
$p->set_var('dayname','');
|
);
|
||||||
}
|
$p->set_var($var);
|
||||||
}
|
}
|
||||||
$p->parse('monthweek_day','mini_day',True);
|
$p->parse('monthweek_day','mini_day',True);
|
||||||
}
|
}
|
||||||
|
@ -57,20 +57,32 @@
|
|||||||
$printer = '';
|
$printer = '';
|
||||||
$param = 'year='.$thisyear.'&month='.$thismonth.'&friendly=1&filter='.$filter.'&owner='.$owner;
|
$param = 'year='.$thisyear.'&month='.$thismonth.'&friendly=1&filter='.$filter.'&owner='.$owner;
|
||||||
$print = '<a href="'.$phpgw->link('/calendar/month.php',$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>';
|
$print = '<a href="'.$phpgw->link('/calendar/month.php',$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>';
|
||||||
|
$minical_prev = $phpgw->calendar->mini_calendar(1,$thismonth - 1,$thisyear,'day.php');
|
||||||
|
$minical_next = $phpgw->calendar->mini_calendar(1,$thismonth + 1,$thisyear,'day.php');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$printer = '<body bgcolor="'.$phpgw_info['theme']['bg_color'].'">';
|
$printer = '<body bgcolor="'.$phpgw_info['theme']['bg_color'].'">';
|
||||||
$print = '';
|
$print = '';
|
||||||
|
if($phpgw_info['user']['preferences']['calendar']['display_minicals'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['display_minicals'])
|
||||||
|
{
|
||||||
|
$minical_prev = $phpgw->calendar->mini_calendar(1,$thismonth - 1,$thisyear,'day.php');
|
||||||
|
$minical_next = $phpgw->calendar->mini_calendar(1,$thismonth + 1,$thisyear,'day.php');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$minical_prev = '';
|
||||||
|
$minical_next = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$var = Array(
|
$var = Array(
|
||||||
'printer_friendly' => $printer,
|
'printer_friendly' => $printer,
|
||||||
'bg_text' => $phpgw_info['themem']['bg_text'],
|
'bg_text' => $phpgw_info['themem']['bg_text'],
|
||||||
'small_calendar_prev' => $phpgw->calendar->mini_calendar(1,$thismonth - 1,$thisyear,'day.php'),
|
'small_calendar_prev' => $minical_prev,
|
||||||
'month_identifier' => lang(strftime("%B",$m)) . ' ' . $thisyear,
|
'month_identifier' => lang(strftime("%B",$m)) . ' ' . $thisyear,
|
||||||
'username' => $phpgw->common->grab_owner_name($owner),
|
'username' => $phpgw->common->grab_owner_name($owner),
|
||||||
'small_calendar_next' => $phpgw->calendar->mini_calendar(1,$thismonth + 1,$thisyear,'day.php'),
|
'small_calendar_next' => $minical_next,
|
||||||
'large_month' => $phpgw->calendar->display_large_month($thismonth,$thisyear,True,$owner),
|
'large_month' => $phpgw->calendar->display_large_month($thismonth,$thisyear,True,$owner),
|
||||||
'print' => $print
|
'print' => $print
|
||||||
);
|
);
|
||||||
|
@ -66,6 +66,15 @@
|
|||||||
{
|
{
|
||||||
$phpgw->preferences->delete('calendar','default_private');
|
$phpgw->preferences->delete('calendar','default_private');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($display_minicals == True)
|
||||||
|
{
|
||||||
|
$phpgw->preferences->add('calendar','display_minicals');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$phpgw->preferences->delete('calendar','display_minicals');
|
||||||
|
}
|
||||||
$phpgw->preferences->save_repository(True);
|
$phpgw->preferences->save_repository(True);
|
||||||
|
|
||||||
Header('Location: '.$phpgw->link('/preferences/index.php'));
|
Header('Location: '.$phpgw->link('/preferences/index.php'));
|
||||||
@ -174,16 +183,19 @@
|
|||||||
// . '<option value="private+group"'.$selected['private+group'].'>'.lang('private and group public').'</option>'
|
// . '<option value="private+group"'.$selected['private+group'].'>'.lang('private and group public').'</option>'
|
||||||
// . '<option value="public+group"'.$selected['public+group'].'>'.lang('global public and group public').'</option>'
|
// . '<option value="public+group"'.$selected['public+group'].'>'.lang('global public and group public').'</option>'
|
||||||
. '</select>';
|
. '</select>';
|
||||||
display_item(lang('default calendar filter'),$str);
|
display_item(lang('Default calendar filter'),$str);
|
||||||
|
|
||||||
$str = '<input type="checkbox" name="send_updates" value="True"'.($phpgw_info['user']['preferences']['calendar']['send_updates'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['send_updates'] == True?' checked':'').'>';
|
$str = '<input type="checkbox" name="send_updates" value="True"'.($phpgw_info['user']['preferences']['calendar']['send_updates'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['send_updates'] == True?' checked':'').'>';
|
||||||
display_item(lang('send/receive updates via email'),$str);
|
display_item(lang('Send/receive updates via email'),$str);
|
||||||
|
|
||||||
$str = '<input type="checkbox" name="display_status" value="True"'.($phpgw_info['user']['preferences']['calendar']['display_status'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['display_status'] == True?' checked':'').'>';
|
$str = '<input type="checkbox" name="display_status" value="True"'.($phpgw_info['user']['preferences']['calendar']['display_status'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['display_status'] == True?' checked':'').'>';
|
||||||
display_item(lang('display status of events'),$str);
|
display_item(lang('Display status of events'),$str);
|
||||||
|
|
||||||
$str = '<input type="checkbox" name="default_private" value="True"'.($phpgw_info['user']['preferences']['calendar']['default_private'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['default_private'] == True?' checked':'').'>';
|
$str = '<input type="checkbox" name="default_private" value="True"'.($phpgw_info['user']['preferences']['calendar']['default_private'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['default_private'] == True?' checked':'').'>';
|
||||||
display_item(lang('when creating new events default set to private'),$str);
|
display_item(lang('When creating new events default set to private'),$str);
|
||||||
|
|
||||||
|
$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);
|
||||||
|
|
||||||
$country = CreateObject('phpgwapi.country');
|
$country = CreateObject('phpgwapi.country');
|
||||||
display_item(lang('Select country for including holidays'),$country->form_select($phpgw_info['user']['preferences']['calendar']['locale'],'locale'));
|
display_item(lang('Select country for including holidays'),$country->form_select($phpgw_info['user']['preferences']['calendar']['locale'],'locale'));
|
||||||
|
@ -75,6 +75,9 @@
|
|||||||
$next_week_link = '<a href="'.$phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/week.php','year='.$next['year'].'&month='.$next['month'].'&day='.$next['day']).'">>></a>';
|
$next_week_link = '<a href="'.$phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/week.php','year='.$next['year'].'&month='.$next['month'].'&day='.$next['day']).'">>></a>';
|
||||||
$param = 'year='.$thisyear.'&month='.$thismonth.'&day='.$thisday.'&friendly=1&filter='.$filter.'&owner='.$owner;
|
$param = 'year='.$thisyear.'&month='.$thismonth.'&day='.$thisday.'&friendly=1&filter='.$filter.'&owner='.$owner;
|
||||||
$print = '<a href="'.$phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/week.php',$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>';
|
$print = '<a href="'.$phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/week.php',$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>';
|
||||||
|
$minical_this = $phpgw->calendar->mini_calendar($thisday,$thismonth,$thisyear,'day.php');
|
||||||
|
$minical_prev = $phpgw->calendar->mini_calendar(1,$thismonth - 1,$thisyear,'day.php');
|
||||||
|
$minical_next = $phpgw->calendar->mini_calendar(1,$thismonth + 1,$thisyear,'day.php');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -82,18 +85,30 @@
|
|||||||
$prev_week_link = '<<';
|
$prev_week_link = '<<';
|
||||||
$next_week_link = '>>';
|
$next_week_link = '>>';
|
||||||
$print = '';
|
$print = '';
|
||||||
|
if($phpgw_info['user']['preferences']['calendar']['display_minicals'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['display_minicals'])
|
||||||
|
{
|
||||||
|
$minical_this = $phpgw->calendar->mini_calendar($thisday,$thismonth,$thisyear,'day.php');
|
||||||
|
$minical_prev = $phpgw->calendar->mini_calendar(1,$thismonth - 1,$thisyear,'day.php');
|
||||||
|
$minical_next = $phpgw->calendar->mini_calendar(1,$thismonth + 1,$thisyear,'day.php');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$minical_this = '';
|
||||||
|
$minical_prev = '';
|
||||||
|
$minical_next = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$var = Array(
|
$var = Array(
|
||||||
'printer_friendly' => $printer,
|
'printer_friendly' => $printer,
|
||||||
'bg_text' => $phpgw_info['themem']['bg_text'],
|
'bg_text' => $phpgw_info['themem']['bg_text'],
|
||||||
'small_calendar_prev' => $phpgw->calendar->mini_calendar(1,$thismonth - 1,$thisyear,'day.php'),
|
'small_calendar_prev' => $minical_prev,
|
||||||
'prev_week_link' => $prev_week_link,
|
'prev_week_link' => $prev_week_link,
|
||||||
'small_calendar_this' => $phpgw->calendar->mini_calendar($thisday,$thismonth,$thisyear,'day.php'),
|
'small_calendar_this' => $minical_this,
|
||||||
'week_identifier' => $week_id,
|
'week_identifier' => $week_id,
|
||||||
'next_week_link' => $next_week_link,
|
'next_week_link' => $next_week_link,
|
||||||
'username' => $phpgw->common->grab_owner_name($owner),
|
'username' => $phpgw->common->grab_owner_name($owner),
|
||||||
'small_calendar_next' => $phpgw->calendar->mini_calendar(1,$thismonth + 1,$thisyear,'day.php'),
|
'small_calendar_next' => $minical_next,
|
||||||
'week_display' => $phpgw->calendar->display_large_week($thisday,$thismonth,$thisyear,true,$owner),
|
'week_display' => $phpgw->calendar->display_large_week($thisday,$thismonth,$thisyear,true,$owner),
|
||||||
'print' => $print
|
'print' => $print
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user