Index: openacs-4/packages/calendar-portlet/tcl/calendar-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/tcl/calendar-portlet-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/calendar-portlet/tcl/calendar-portlet-procs.tcl 1 Nov 2001 23:11:51 -0000 1.7 +++ openacs-4/packages/calendar-portlet/tcl/calendar-portlet-procs.tcl 9 Nov 2001 19:37:03 -0000 1.8 @@ -70,10 +70,6 @@ set bgcolor_html "border=1 color=blue" set view day - - # AKS: code from calendar/www/cal-dayview.tcl - # --- - set mlist "" set set_id [ns_set new day_items] @@ -109,73 +105,77 @@
" } + # shaded_p support version 1 + + if { $config(shaded_p) == "f" } { - set row_html " - - " - - while {$i < $num_hour_rows} { - set filled_cell_count 0 - - # making hours before 10 looks prettier - if {$i < 10} { set cal_hour "0$i" } else { set cal_hour "$i" } + set row_html " +
TimeTitle
+ + + \n" - # am or pm determination logic - if {$i < 12} { - if {$i == 0} { - set time "12:00 am" + while {$i < $num_hour_rows} { + set filled_cell_count 0 + + # making hours before 10 looks prettier + if {$i < 10} { set cal_hour "0$i" } else { set cal_hour "$i" } + + # am or pm determination logic + if {$i < 12} { + if {$i == 0} { + set time "12:00 am" + } else { + set time "$cal_hour:00 am" + } } else { - set time "$cal_hour:00 am" + if {$i == 12} { + set time "12:00 pm" + } else { + set fm_hour [expr $i - 12] + if {$fm_hour < 10} { + set fm_hour "0$fm_hour" + } + set time "$fm_hour:00 pm" + } } - } else { - if {$i == 12} { - set time "12:00 pm" - } else { - set fm_hour [expr $i - 12] - if {$fm_hour < 10} { - set fm_hour "0$fm_hour" - } - set time "$fm_hour:00 pm" - } - } + + set cal_item_index [ns_set find $set_id $cal_hour] + + append row_html " + + + + \n" - set cal_item_index [ns_set find $set_id $cal_hour] - - append row_html " - - - - " - - incr i - } + incr i + } - append row_html "
TimeTitle
+ $time + " + + if {$cal_item_index == -1} { + append row_html " " + } + + while {$cal_item_index > -1} { + append row_html "[ns_set value $set_id $cal_item_index]" + ns_set delete $set_id $cal_item_index + set cal_item_index [ns_set find $set_id $cal_hour] + } + + append row_html "
- $time - " - - if {$cal_item_index == -1} { - append row_html " " - } - - while {$cal_item_index > -1} { - append row_html "[ns_set value $set_id $cal_item_index]" - ns_set delete $set_id $cal_item_index - set cal_item_index [ns_set find $set_id $cal_hour] - } - - append row_html "
" + append row_html "" - - # --- - # AKS: end lots of code from calendar/www/cal-dayview.tcl + } else { + # shaded_p + set row_html "" + } set template " - $row_html -
" + " - set code [template::adp_compile -string $template] set output [template::adp_eval code]