Index: openacs-4/packages/calendar/www/cal-weekview.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-weekview.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/calendar/www/cal-weekview.tcl 15 Sep 2001 07:14:32 -0000 1.4 +++ openacs-4/packages/calendar/www/cal-weekview.tcl 23 Sep 2001 15:12:41 -0000 1.5 @@ -45,53 +45,7 @@ #----------------------------------------------- # get cal-item -set sql " -select to_char(start_date, 'J') as start_date, - to_char(start_date, 'HH24:MI') as pretty_start_date, - to_char(end_date, 'HH24:MI') as pretty_end_date, - coalesce(e.name, a.name) as name, - e.event_id as item_id -from acs_activities a, - acs_events e, - timespans s, - time_intervals t -where e.timespan_id = s.timespan_id -and s.interval_id = t.interval_id -and e.activity_id = a.activity_id -and start_date between - to_date(:sunday_of_the_week,'YYYY-MM-DD') and - to_date(:saturday_of_the_week,'YYYY-MM-DD') -and e.event_id -in ( - select cal_item_id - from cal_items - where on_which_calendar = :calendar_id - ) -" -#set sql " -#select to_char(start_date, 'J') as start_date, -# to_char(start_date, 'HH24:MI') as pretty_start_date, -# to_char(end_date, 'HH24:MI') as pretty_end_date, -# nvl(e.name, a.name) as name, -# e.event_id as item_id -#from acs_activities a, -# acs_events e, -# timespans s, -# time_intervals t -#where e.timespan_id = s.timespan_id -#and s.interval_id = t.interval_id -#and e.activity_id = a.activity_id -#and start_date between -# to_date(:sunday_of_the_week,'YYYY-MM-DD') and -# to_date(:saturday_of_the_week,'YYYY-MM-DD') -#and e.event_id -#in ( -# select cal_item_id -# from cal_items -# where on_which_calendar = :calendar_id -# ) -#" set mlist "" set set_id [ns_set new week_items] @@ -118,7 +72,29 @@ } - db_foreach get_day_items $sql { + db_foreach get_day_items { +select to_char(start_date, 'J') as start_date, + to_char(start_date, 'HH24:MI') as pretty_start_date, + to_char(end_date, 'HH24:MI') as pretty_end_date, + nvl(e.name, a.name) as name, + e.event_id as item_id +from acs_activities a, + acs_events e, + timespans s, + time_intervals t +where e.timespan_id = s.timespan_id +and s.interval_id = t.interval_id +and e.activity_id = a.activity_id +and start_date between + to_date(:sunday_of_the_week,'YYYY-MM-DD') and + to_date(:saturday_of_the_week,'YYYY-MM-DD') +and e.event_id +in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) +} { ns_set put $set_id $start_date "
  • $pretty_start_date - $pretty_end_date $name ($calendar_name) " @@ -144,7 +120,29 @@ } - db_foreach get_day_items $sql { + db_foreach get_day_items { +select to_char(start_date, 'J') as start_date, + to_char(start_date, 'HH24:MI') as pretty_start_date, + to_char(end_date, 'HH24:MI') as pretty_end_date, + nvl(e.name, a.name) as name, + e.event_id as item_id +from acs_activities a, + acs_events e, + timespans s, + time_intervals t +where e.timespan_id = s.timespan_id +and s.interval_id = t.interval_id +and e.activity_id = a.activity_id +and start_date between + to_date(:sunday_of_the_week,'YYYY-MM-DD') and + to_date(:saturday_of_the_week,'YYYY-MM-DD') +and e.event_id +in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) +} { ns_set put $set_id $start_date "
  • $pretty_start_date - $pretty_end_date $name ($calendar_name) "