diff --git a/calendar/inc/class.uicalendar.inc.php b/calendar/inc/class.uicalendar.inc.php index ae8667fbf1..b982845558 100755 --- a/calendar/inc/class.uicalendar.inc.php +++ b/calendar/inc/class.uicalendar.inc.php @@ -1276,6 +1276,7 @@ $p->set_block('day_t','day','day'); $p->set_block('day_t','day_event','day_event'); + $todos = $this->get_todos($todo_label); $var = Array( 'printer_friendly' => $printer, 'bg_text' => $this->theme['bg_text'], @@ -1289,7 +1290,10 @@ 'small_calendar' => $minical, 'date' => $this->bo->long_date($now), 'username' => $GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner), - 'print' => $print + 'print' => $print, + 'lang_todos' => $todo_label, + 'todos' => $this->bo->printer_friendly ? $todos : + "
"; print_r($events_to_show); echo "\n"; + $other = $GLOBALS['phpgw']->hooks->process(array( + 'location' => 'calendar_include_events', + 'year' => $params['year'], + 'month' => $params['month'], + 'day' => $params['day'], + 'owner' => $this->bo->owner // num. id of the user, not necessary current user + )); + + if (is_array($other)) + { + foreach($other as $evts) + { + if (is_array($evts)) + { + $events_to_show = array_merge($events_to_show,$evts); + } + } + usort($events_to_show,create_function('$a,$b','return $a[\'starttime\']-$b[\'starttime\'];')); + //echo "events_to_show=
"; print_r($events_to_show); echo "\n"; + } + + $last_slot_end = -1; + foreach($events_to_show as $event) + { + $slot = $this->slot_num($event['starttime'],$day_start,$day_end); + $slot_end = isset($event['endtime']) ? $this->slot_num($event['endtime']-1) : $slot; // -1 to not occupy eg. the 18.00 slot for a 17-18h date if ($slot <= $last_slot_end) { $slot = $last_slot; $slot_end = max($last_slot_end,$slot_end); } - $rows[$slot] .= $this->link_to_entry($event,$params['month'],$params['day'],$params['year']); + $rows[$slot] .= $event['content']; print_debug('slot',$slot); print_debug('row',$rows[$slot]); $row_span[$slot] = 1 + $slot_end - $slot; - + $last_slot = $slot; $last_slot_end = $slot_end; print_debug('Time',$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['start']) - $GLOBALS['phpgw']->datetime->tz_offset).' - '.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['end']) - $GLOBALS['phpgw']->datetime->tz_offset)); @@ -3297,14 +3376,14 @@ $p->set_var('extras',''); if ($rowspan > 1) { - $p->set_var('item',''); + $p->set_var('event',''); $rowspan--; } elseif (!isset($rows[$slot])) { $p->set_var('event',' '); $row_to_print = $this->nm_on_off(); - $p->parse('item','day_event'.$row_to_print,False); + $p->parse('event','day_event'.$row_to_print); } else { @@ -3315,7 +3394,7 @@ } $p->set_var('event',$rows[$slot]); $row_to_print = $this->nm_on_off(); - $p->parse('item','day_event'.$row_to_print,False); + $p->parse('event','day_event'.$row_to_print); } $open_link = $close_link = ''; $time = ' '; @@ -3327,21 +3406,20 @@ $min = date('i',$time); $time = $GLOBALS['phpgw']->common->formattime($hour,$min); - $open_link = ' - '; if(!$this->bo->printer_friendly && $this->bo->check_perms(PHPGW_ACL_ADD)) { - $open_link .= ''; - $close_link = ''; + $open_link = ' '; + $close_link = ' '; } } - $var = Array( + $p->set_var(Array( 'open_link' => $open_link, 'time' => $time, 'close_link' => $close_link, 'tr_color' => '' // dummy to stop output_template_array to set it - ); - $this->output_template_array($p,'item','day_time',$var); - + )); + $p->parse('time','day_time'); + $p->parse('row','day_row',True); } return $p->fp('out','day'); diff --git a/calendar/setup/phpgw_de.lang b/calendar/setup/phpgw_de.lang index 14398f3ff1..3b49ef5bf2 100644 --- a/calendar/setup/phpgw_de.lang +++ b/calendar/setup/phpgw_de.lang @@ -180,6 +180,7 @@ on participant responses too calendar de auch bei Antworten der Teilnehmer on time change of more than 4 hours too calendar de bei zeitlichen Änderungen größer als 4 Stunden on time change of time of more than 4 hours (and above options) calendar de wenn der Termin sich um mehr als 4 Stunde verschiebt (und obige Optionen) on time-changes >= 4 hours too calendar de +open todo's: calendar de unerledigte Aufgaben: order calendar de Reihenfolge overlap holiday calendar de überlappender Feiertag participant calendar de Teilnehmer diff --git a/calendar/setup/phpgw_en.lang b/calendar/setup/phpgw_en.lang index f82b26b1ea..2573eff9b7 100644 --- a/calendar/setup/phpgw_en.lang +++ b/calendar/setup/phpgw_en.lang @@ -164,6 +164,7 @@ on any time change too calendar en on any time change too on invitation / cancelation only calendar en on invitation / cancelation only on participant responses too calendar en on participant responses too on time change of more than 4 hours too calendar en on time change of more than 4 hours too +open todo's: calendar en open ToDo's: order calendar en Order overlap holiday calendar en overlap holiday participant calendar en Participant diff --git a/calendar/templates/default/day.tpl b/calendar/templates/default/day.tpl index 571ae4fe8a..2a57a4ffd5 100755 --- a/calendar/templates/default/day.tpl +++ b/calendar/templates/default/day.tpl @@ -4,34 +4,40 @@
- | ||
-
|
- - {small_calendar} - | -
+ {date} + {username} + |
+
{print}
+ ++{small_calendar} + | +
+ {lang_todos} +{todos} + | +
- | ||
-
| - {small_calendar} - | -
cal_to_include("; print_r($args); echo ")
\n"; + $user = intval($args['owner']); + if ($user <= 0 && !checkdate($args['month'],$args['day'],$args['year'])) + { + return False; + } + $do_events = $args['location'] == 'calendar_include_events'; + $start = 0; + $to_include = array(); + $date_wanted = sprintf('%04d/%02d/%02d',$args['year'],$args['month'],$args['day']); + while ($infos = $this->search('info_startdate','',"user$user".($do_events?'date':'opentoday').$date_wanted,'','','','','',$start,$total)) + { + foreach($infos as $info) + { + $time = intval(date('Hi',$info['info_startdate'])); + $date = date('Y/m/d',$info['info_startdate']); + if ($do_events && !$time || + !$do_events && $time && $date == $date_wanted) + { + continue; + } + if (!is_object($GLOBALS['phpgw']->html)) // only once and only if thers something to report + { + $GLOBALS['phpgw']->html = CreateObject('etemplate.html'); + $GLOBALS['phpgw']->translation->add_app('infolog'); + } + $title = ($do_events?$GLOBALS['phpgw']->common->formattime(date('H',$info['info_startdate']),date('i',$info['info_startdate'])).' ':''). + $info['info_subject']; + $view = $this->link->view('infolog',$info['info_id']); + $content = ''; + foreach($icons = array( + $info['info_type'] => 'infolog', + $info['info_status'] => 'infolog' + ) as $name => $app) + { + $content .= $GLOBALS['phpgw']->html->image($app,$name,lang($name),'border="0" width="15" height="15"').' '; + } + $content = ''.$GLOBALS['phpgw']->html->a_href($content.' '.$title,$view).'
'; + + $to_include[] = array( + 'starttime' => $info['info_startdate'], + 'endtime' => $info['info_enddate'] ? $info['info_enddate'] : $info['info_startdate'], + 'title' => $title, + 'view' => $view, + 'icons' => $icons, + 'content' => $content + ); + } + if ($total <= $start+count($infos)) + { + break; // no more availible + } + } + //echo "boinfolog::cal_to_include("; print_r($args); echo ")"; print_r($to_include); echo "\n"; + return $to_include; + } } diff --git a/infolog/inc/class.soinfolog.inc.php b/infolog/inc/class.soinfolog.inc.php index 71dabf2b89..6e3b88fd27 100644 --- a/infolog/inc/class.soinfolog.inc.php +++ b/infolog/inc/class.soinfolog.inc.php @@ -88,15 +88,16 @@ @param $filter: none|all - list all entrys user have rights to see
soinfolog.search(action='$action/$action_id')
\n"; + //echo "soinfolog.search(order='$order',,filter='$filter',,query='$query',action='$action/$action_id')
\n"; $action2app = array( 'addr' => 'addressbook', 'proj' => 'projects', @@ -468,7 +486,7 @@ $filtermethod = $this->aclFilter($filter); $filtermethod .= $this->statusFilter($filter); $filtermethod .= $this->dateFilter($filter); - // echo "filtermethod='$filtermethod'
"; + //echo "filtermethod='$filtermethod'
"; if (intval($cat_id)) { @@ -501,6 +519,7 @@ $start = 0; } $this->db->limit_query($sql="SELECT DISTINCT phpgw_infolog.* $query $ordermethod",$start,__LINE__,__FILE__); + while ($this->db->next_record()) { $this->db2data(&$info); diff --git a/infolog/setup/setup.inc.php b/infolog/setup/setup.inc.php index a52398000a..dd1fc5056e 100755 --- a/infolog/setup/setup.inc.php +++ b/infolog/setup/setup.inc.php @@ -34,7 +34,7 @@ The entries may be viewed or added from InfoLog direct or from within the contact/address, project or calendar view.Other documents / files can be linked to InfoLog entries and are store in the VFS - (phpGroupWare\'s virtual file system). An extension of the VFS allows to symlink + (eGroupWare\'s virtual file system). An extension of the VFS allows to symlink the files to a fileserver, instead of placeing a copy in the VFS (need to be configured in the admin-section). It is planed to include emails and faxes into InfoLog in the future.'; @@ -44,7 +44,7 @@ expressions and direct calls to php-functions (e.g. to link the phone calls (again) to the addressbook entrys).
More information about InfoLog and the current development-status can be found on the - InfoLog page in our Wiki.'; + InfoLog page in our Wiki.'; /* The hooks this app includes, needed for hooks registration */ $setup_info['infolog']['hooks'][] = 'preferences'; @@ -57,6 +57,8 @@ $setup_info['infolog']['hooks']['projects_view'] = 'infolog.uiinfolog.hook_view'; $setup_info['infolog']['hooks']['calendar_view'] = 'infolog.uiinfolog.hook_view'; $setup_info['infolog']['hooks']['infolog'] = 'infolog.uiinfolog.hook_view'; + $setup_info['infolog']['hooks']['calendar_include_events'] = 'infolog.boinfolog.cal_to_include'; + $setup_info['infolog']['hooks']['calendar_include_todos'] = 'infolog.boinfolog.cal_to_include'; /* Dependencies for this app to work */ $setup_info['infolog']['depends'][] = array(