html_for_event_day_at_a_glance($event);
+ $event = $events[$i];
+ if($event) $this->html_for_event_day_at_a_glance($event);
}
}
@@ -1197,67 +1201,68 @@
$this->rowspan = 0;
$this->last_row = -1;
for ($i=0;$i<24;$i++) {
- if(isset($this->rowspan_arr[$i])) $r = $this->rowspan_arr[$i]; else $r = 0;
- if(isset($this->hour_arr[$i])) $h = $this->hour_arr[$i]; else $h = "";
- if ($this->rowspan > 1) {
- if (strlen($h)) {
- $this->hour_arr[$this->last_row] .= $this->hour_arr[$i];
- $this->hour_arr[$i] = "";
- $this->rowspan_arr[$i] = 0;
- }
- $this->rowspan--;
- } elseif ($r > 1) {
- $this->rowspan = $this->rowspan_arr[$i];
- $this->last_row = $i;
- }
+ if(isset($this->rowspan_arr[$i])) $r = $this->rowspan_arr[$i]; else $r = 0;
+ if(isset($this->hour_arr[$i])) $h = $this->hour_arr[$i]; else $h = "";
+ if ($this->rowspan > 1) {
+ if (strlen($h)) {
+ $this->hour_arr[$this->last_row] .= $this->hour_arr[$i];
+ $this->hour_arr[$i] = "";
+ $this->rowspan_arr[$i] = 0;
+ }
+ $this->rowspan--;
+ } elseif ($r > 1) {
+ $this->rowspan = $this->rowspan_arr[$i];
+ $this->last_row = $i;
+ }
}
if (isset($this->hour_arr[99]) && strlen($this->hour_arr[99])) {
- $str .= ""
- . " | ".$this->hour_arr[99]." |
\n";
+ $p->set_var('bgcolor1',$phpgw_info["theme"]["cal_dayview"]);
+ $p->set_var('text',$this->hour_arr[99]);
+ $p->set_var('bgcolor',$phpgw->nextmatchs->alternate_row_color());
+ $p->set_var('time',' ');
+ $p->parse('row','day_row',True);
}
$this->rowspan = 0;
+ $p->set_var('bgcolor1',$phpgw_info["theme"]["cal_dayview"]);
+ $p->set_var('font_color',$phpgw_info["theme"]["bg_text"]);
for ($i=$this->first_hour;$i<=$this->last_hour;$i++) {
- if(isset($this->hour_arr[$i])) $h = $this->hour_arr[$i]; else $h = "";
- $time = $this->build_time_for_display($i * 10000);
- $str .= "";
-
- // tooley: the hour - 36400 is a HACK for improper storage of hour allows
- // in user preference land.
- if(!$this->printer_friendly) {
- $str .= "link($phpgw_info["server"]["webserver_url"]."/calendar/edit_entry.php","year=".$date["year"]
- . "&month=".$date["month"]."&day=".$date["day"]
- . "&hour=".substr($time,0,strpos($time,":"))
- . "&minute=".substr($time,strpos($time,":")+1,2))."\">";
- }
- $str .= $time;
- if(!$this->printer_friendly) {
- $str .= "";
- }
- $str .= " | ";
- if ($this->rowspan > 1) {
- // this might mean there's an overlap, or it could mean one event
- // ends at 11:15 and another starts at 11:30.
- if (strlen($h))
- $str .= "".$this->hour_arr[$i]." |
\n";
- $this->rowspan--;
- } else {
- if (!strlen($h))
- $str .= " | \n";
- else {
- $this->rowspan = isset($this->rowspan_arr[$i])?$this->rowspan_arr[$i]:0;
- if ($this->rowspan > 1)
- $str .= "rowspan."\">"
- . $this->hour_arr[$i]." | \n";
- else
- $str .= "".$this->hour_arr[$i]." | \n";
- }
- }
+ $p->set_var('bgcolor',$phpgw->nextmatchs->alternate_row_color());
+ if(isset($this->hour_arr[$i])) $h = $this->hour_arr[$i]; else $h = "";
+ $time = $this->build_time_for_display($i * 10000);
+ $p->set_var('extras','');
+ $p->set_var('event',' ');
+ if ($this->rowspan > 1) {
+ // this might mean there's an overlap, or it could mean one event
+ // ends at 11:15 and another starts at 11:30.
+ if (strlen($h))
+ $p->set_var('event',$this->hour_arr[$i]);
+ $this->rowspan--;
+ } else {
+ if (strlen($h)) {
+ $this->rowspan = isset($this->rowspan_arr[$i])?$this->rowspan_arr[$i]:0;
+ if ($this->rowspan > 1) {
+ $p->set_var('extras','valign="top" rowspan="'.$this->rowspan.'"');
+ $p->set_var('event',$this->hour_arr[$i]);
+ } else {
+ $p->set_var('event',$this->hour_arr[$i]);
+ }
+ }
+ }
+ $p->set_var('open_link','');
+ $p->set_var('close_link','');
+ if(!$this->printer_friendly) {
+ $p->set_var('open_link','');
+ }
+ $p->set_var('time',$time);
+ if(!$this->printer_friendly) {
+ $p->set_var('close_link','');
+ }
+ $p->parse('row','day_row',True);
} // end for
- $str .= "