Index: openacs-4/packages/calendar/www/view-one-day-display.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-one-day-display.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/calendar/www/view-one-day-display.adp 21 Jul 2003 19:21:36 -0000 1.2 +++ openacs-4/packages/calendar/www/view-one-day-display.adp 22 Jul 2003 15:32:06 -0000 1.3 @@ -44,7 +44,7 @@ - + @day_items_with_time.start_time@ - @day_items_with_time.end_time@ @@ -54,7 +54,7 @@ -   +   Index: openacs-4/packages/calendar/www/view-one-day-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-one-day-display.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/calendar/www/view-one-day-display.tcl 21 Jul 2003 19:21:36 -0000 1.2 +++ openacs-4/packages/calendar/www/view-one-day-display.tcl 22 Jul 2003 15:32:06 -0000 1.3 @@ -33,8 +33,8 @@ set day_items_per_hour {} db_foreach select_day_items_with_time {} { - set start_hour [expr int($start_hour)] - + set start_hour [string trimleft $start_hour "0"] + set end_hour [string trimleft $end_hour "0"] for { set item_current_hour $start_hour } { $item_current_hour < $end_hour } { incr item_current_hour } { if {$start_hour == $item_current_hour} { lappend day_items_per_hour [list $item_current_hour $name $item_id $calendar_name $status_summary $start_hour $end_hour $start_time $end_time] @@ -44,7 +44,6 @@ incr items_per_hour($item_current_hour) } - } set day_items_per_hour [lsort -command calendar::compare_day_items_by_current_hour $day_items_per_hour] @@ -58,29 +57,18 @@ } } -# Get the colspan for each hour -for {set i 0 } { $i < 24 } { incr i } { - set colspan($i) $max_items_per_hour -} - foreach item $day_items_per_hour { - set item_id [lindex $item 1] - set item_start_hour [lindex $item 5] + set item_start_hour [expr int( [lindex $item 5])] set item_end_hour [lindex $item 6] -} - - -foreach item $day_items_per_hour { - set item_start_hour [lindex $item 5] - set item_end_hour [lindex $item 6] set rowspan [expr $item_end_hour - $item_start_hour] if {$item_start_hour > $day_current_hour} { # need to add dummy entries to show all hours for { } { $day_current_hour < $item_start_hour } { incr day_current_hour } { multirow append day_items_with_time $day_current_hour "" "" "" "" "" "" "" "" 0 0 } } - multirow append day_items_with_time [lindex $item 0] [lindex $item 1] [lindex $item 2] [lindex $item 3] [lindex $item 4] [lindex $item 5] [lindex $item 6] [lindex $item 7] [lindex $item 8] [expr $max_items_per_hour - $items_per_hour($item_start_hour) +1] $rowspan + + multirow append day_items_with_time [lindex $item 0] [lindex $item 1] [lindex $item 2] [lindex $item 3] [lindex $item 4] [lindex $item 5] [lindex $item 6] [lindex $item 7] [lindex $item 8] 0 $rowspan set day_current_hour [expr [lindex $item 0] +1 ] }