mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Applied Ralf Becker's patches for planner. Still have some unresolved issues with multiple categories. Also some possible fixes for mhicks.
This commit is contained in:
parent
80062a3afe
commit
407c60e759
@ -276,11 +276,6 @@
|
|||||||
|
|
||||||
if (!$this->bo->printer_friendly)
|
if (!$this->bo->printer_friendly)
|
||||||
{
|
{
|
||||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
|
||||||
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
|
||||||
unset($GLOBALS['phpgw_info']['flags']['noappheader']);
|
|
||||||
unset($GLOBALS['phpgw_info']['flags']['noappfooter']);
|
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
|
||||||
$printer = '';
|
$printer = '';
|
||||||
$param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1';
|
$param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1';
|
||||||
$print = '<a href="'.$this->page('month'.$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>';
|
$print = '<a href="'.$this->page('month'.$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window.status = '".lang('Generate printer-friendly version')."'\">[".lang('Printer Friendly').']</a>';
|
||||||
@ -303,6 +298,15 @@
|
|||||||
'print' => $print
|
'print' => $print
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$this->bo->printer_friendly)
|
||||||
|
{
|
||||||
|
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||||
|
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
||||||
|
unset($GLOBALS['phpgw_info']['flags']['noappheader']);
|
||||||
|
unset($GLOBALS['phpgw_info']['flags']['noappfooter']);
|
||||||
|
$GLOBALS['phpgw']->common->phpgw_header();
|
||||||
|
}
|
||||||
|
|
||||||
$p = CreateObject('phpgwapi.Template',$this->template_dir);
|
$p = CreateObject('phpgwapi.Template',$this->template_dir);
|
||||||
$p->set_unknowns('remove');
|
$p->set_unknowns('remove');
|
||||||
$p->set_file(
|
$p->set_file(
|
||||||
@ -321,7 +325,7 @@
|
|||||||
$next = $this->bo->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day + 7,$this->bo->year);
|
$next = $this->bo->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day + 7,$this->bo->year);
|
||||||
$prev = $this->bo->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day - 7,$this->bo->year);
|
$prev = $this->bo->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day - 7,$this->bo->year);
|
||||||
|
|
||||||
if (!$this->bo->printer_firendly || ($this->bo->printer_friendly && @$this->bo->prefs['calendar']['display_minicals']))
|
if (!$this->bo->printer_friendly || ($this->bo->printer_friendly && @$this->bo->prefs['calendar']['display_minicals']))
|
||||||
{
|
{
|
||||||
$minical_this = $this->mini_calendar(
|
$minical_this = $this->mini_calendar(
|
||||||
Array(
|
Array(
|
||||||
@ -363,9 +367,6 @@
|
|||||||
|
|
||||||
if (!$this->bo->printer_friendly)
|
if (!$this->bo->printer_friendly)
|
||||||
{
|
{
|
||||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
|
||||||
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
|
||||||
$printer = '';
|
$printer = '';
|
||||||
$prev_week_link = '<a href="'.$this->page('week','&date='.$prev['full']).'"><<</a>';
|
$prev_week_link = '<a href="'.$this->page('week','&date='.$prev['full']).'"><<</a>';
|
||||||
$next_week_link = '<a href="'.$this->page('week','&date='.$next['full']).'">>></a>';
|
$next_week_link = '<a href="'.$this->page('week','&date='.$next['full']).'">>></a>';
|
||||||
@ -400,6 +401,13 @@
|
|||||||
'print' => $print
|
'print' => $print
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$this->bo->printer_friendly)
|
||||||
|
{
|
||||||
|
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||||
|
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
||||||
|
$GLOBALS['phpgw']->common->phpgw_header();
|
||||||
|
}
|
||||||
|
|
||||||
$p = CreateObject('phpgwapi.Template',$this->template_dir);
|
$p = CreateObject('phpgwapi.Template',$this->template_dir);
|
||||||
$p->set_file(
|
$p->set_file(
|
||||||
Array(
|
Array(
|
||||||
@ -1003,7 +1011,7 @@
|
|||||||
|
|
||||||
if ($akt_cell < $start_cell)
|
if ($akt_cell < $start_cell)
|
||||||
{
|
{
|
||||||
$row[$event->id.\'_1\'] = \' \';
|
$row[$event[\'id\'].\'_1\'] = \' \';
|
||||||
$row[\'.\'.$event[\'id\'].\'_1\'] = \'colspan="\'.($start_cell-$akt_cell).\'"\';
|
$row[\'.\'.$event[\'id\'].\'_1\'] = \'colspan="\'.($start_cell-$akt_cell).\'"\';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1034,23 +1042,29 @@
|
|||||||
|
|
||||||
$akt_cell = $end_cell + 1;
|
$akt_cell = $end_cell + 1;
|
||||||
}
|
}
|
||||||
ksort($rows);
|
}
|
||||||
while (list($k,$r) = each($rows))
|
ksort($rows);
|
||||||
|
while (list($k,$r) = each($rows))
|
||||||
|
{
|
||||||
|
if (is_array($r))
|
||||||
{
|
{
|
||||||
if (is_array($r))
|
$rows[\'.\'.$k] = \'bgcolor="\'.$GLOBALS[\'phpgw\']->nextmatchs->alternate_row_color().\'"\';
|
||||||
|
$row = &$rows[$k];
|
||||||
|
$akt_cell = &$rows[\'.nr_\'.$k];
|
||||||
|
if ($akt_cell <= $last_cell)
|
||||||
{
|
{
|
||||||
$rows[\'.\'.$k] = \'bgcolor="\'.$GLOBALS[\'phpgw\']->nextmatchs->alternate_row_color().\'"\';
|
$row[\'3\'] = \' \';
|
||||||
$row = &$rows[$k];
|
$row[\'.3\'] = \'colspan="\'.(1+$last_cell-$akt_cell).\'"\';
|
||||||
$akt_cell = &$rows[\'.nr_\'.$k];
|
|
||||||
if ($akt_cell <= $last_cell)
|
|
||||||
{
|
|
||||||
$row[\'3\'] = \' \';
|
|
||||||
$row[\'.3\'] = \'colspan="\'.(1+$last_cell-$akt_cell).\'"\';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$bgcolor = \'bgcolor="\'.$this->theme[\'th_bg\'].\'"\';
|
$bgcolor = \'bgcolor="\'.$this->theme[\'th_bg\'].\'"\';
|
||||||
|
|
||||||
|
if ($this->debug)
|
||||||
|
{
|
||||||
|
_debug_array($rows);
|
||||||
|
reset($rows);
|
||||||
|
}
|
||||||
echo $html->table(
|
echo $html->table(
|
||||||
array(
|
array(
|
||||||
\'_h\' => $header,
|
\'_h\' => $header,
|
||||||
@ -1058,8 +1072,8 @@
|
|||||||
)+$rows,
|
)+$rows,
|
||||||
\'width="100%" cols="\'.(1+$days*$intervals_per_day).\'"\'
|
\'width="100%" cols="\'.(1+$days*$intervals_per_day).\'"\'
|
||||||
);
|
);
|
||||||
');
|
');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1818,17 +1832,34 @@
|
|||||||
return $names;
|
return $names;
|
||||||
}
|
}
|
||||||
|
|
||||||
function planner_category($id)
|
function planner_category($ids)
|
||||||
{
|
{
|
||||||
static $cats;
|
static $cats;
|
||||||
|
echo "Categories : ".$ids."<br>\n";
|
||||||
if (!isset($cats[$id]))
|
if(!is_array($ids))
|
||||||
{
|
{
|
||||||
$cat_arr = $this->cat->return_single( $id );
|
if (strpos($ids,','))
|
||||||
$cats[$id] = $cat_arr[0];
|
{
|
||||||
$cats[$id]['color'] = strstr($cats[$id]['description'],'#');
|
$id_array = explode(',',$ids);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$id_array[0] = $ids;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $cats[$id];
|
@reset($id_array);
|
||||||
|
$ret_val = Array();
|
||||||
|
while(list($index,$id) = each($id_array))
|
||||||
|
{
|
||||||
|
if (!isset($cats[$id]))
|
||||||
|
{
|
||||||
|
$cat_arr = $this->cat->return_single( $id );
|
||||||
|
$cats[$id] = $cat_arr[0];
|
||||||
|
$cats[$id]['color'] = strstr($cats[$id]['description'],'#');
|
||||||
|
}
|
||||||
|
$ret_val[] = $cats[$id];
|
||||||
|
}
|
||||||
|
return implode($ret_val,',');
|
||||||
}
|
}
|
||||||
|
|
||||||
function week_header($month,$year,$display_name = False)
|
function week_header($month,$year,$display_name = False)
|
||||||
|
Loading…
Reference in New Issue
Block a user