Index: openacs-4/packages/calendar/www/view-list-display-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/view-list-display-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/calendar/www/view-list-display-oracle.xql 11 Aug 2003 12:14:16 -0000 1.2 +++ openacs-4/packages/calendar/www/view-list-display-oracle.xql 9 Sep 2003 09:12:54 -0000 1.3 @@ -12,24 +12,21 @@ nvl(e.status_summary, a.status_summary) as status_summary, e.event_id as item_id, recurrence_id, - (select type from cal_item_types where item_type_id= cal_items.item_type_id) as item_type + (select type from cal_item_types where item_type_id= ci.item_type_id) as item_type from acs_activities a, acs_events e, timespans s, time_intervals t, - cal_items + cal_items ci, + calendars cals where e.timespan_id = s.timespan_id and s.interval_id = t.interval_id and e.activity_id = a.activity_id -and cal_items.cal_item_id= e.event_id +and ci.cal_item_id= e.event_id and (start_date > to_date(:start_date,:date_format) or :start_date is null) and (start_date < to_date(:end_date,:date_format) or :end_date is null) -and e.event_id -in ( - select cal_item_id - from cal_items - where on_which_calendar = :calendar_id - ) +and cals.calendar_id = ci.on_which_calendar +$calendars_clause order by $sort_by Index: openacs-4/packages/calendar/www/view-list-display-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/view-list-display-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/calendar/www/view-list-display-postgresql.xql 11 Aug 2003 12:14:16 -0000 1.4 +++ openacs-4/packages/calendar/www/view-list-display-postgresql.xql 9 Sep 2003 09:12:54 -0000 1.5 @@ -12,24 +12,24 @@ coalesce(e.status_summary, a.status_summary) as status_summary, e.event_id as item_id, recurrence_id, - (select type from cal_item_types where item_type_id= cal_items.item_type_id) as item_type + (select type from cal_item_types where item_type_id= ci.item_type_id) + as item_type, + cals.calendar_id, + cals.calendar_name from acs_activities a, acs_events e, timespans s, time_intervals t, - cal_items + cal_items ci, + calendars cals where e.timespan_id = s.timespan_id and s.interval_id = t.interval_id and e.activity_id = a.activity_id -and cal_items.cal_item_id= e.event_id +and ci.cal_item_id= e.event_id and (start_date > to_date(:start_date,:date_format) or :start_date is null) and (start_date < to_date(:end_date,:date_format) or :end_date is null) -and e.event_id -in ( - select cal_item_id - from cal_items - where on_which_calendar = :calendar_id - ) +and cals.calendar_id = ci.on_which_calendar +$calendars_clause order by $sort_by Index: openacs-4/packages/calendar/www/view-list-display.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-list-display.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/calendar/www/view-list-display.adp 29 Aug 2003 20:46:43 -0000 1.3 +++ openacs-4/packages/calendar/www/view-list-display.adp 9 Sep 2003 09:12:54 -0000 1.4 @@ -39,9 +39,14 @@ @calendar_items.pretty_start_time@ @calendar_items.pretty_end_time@ @calendar_items.item_type@ - @calendar_items.full_item;noquote@ - (@calendar_items.calendar_name@) + @calendar_items.full_item;noquote@ + + (@calendar_items.calendar_name@) + + + Index: openacs-4/packages/calendar/www/view-list-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-list-display.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/calendar/www/view-list-display.tcl 29 Aug 2003 20:46:43 -0000 1.7 +++ openacs-4/packages/calendar/www/view-list-display.tcl 9 Sep 2003 09:12:54 -0000 1.8 @@ -1,21 +1,25 @@ -if { ![exists_and_not_null calendar_id]} { - set calendar_list [calendar::calendar_list] +# Calendar-portlet makes use of this stuff - set calendar_id [lindex [lindex $calendar_list 0] 1] -} - -# calendar-portlet uses this stuff +# Calendar-portlet makes use of this stuff if { ![info exists url_stub_callback] } { set url_stub_callback "" } if { ![info exists item_template] } { set item_template "\$item" } -# calendar-portlet -set calendar_name [calendar_get_name $calendar_id] +if { ![info exists show_calendar_name_p] } { + set show_calendar_name_p 1 +} +if {[exists_and_not_null $calendar_id_list]} { + set calendars_clause "and on_which_calendar in ([join $calendar_id_list ","]) and (cals.private_p='f' or (cals.private_p='t' and cals.owner_id= :user_id))" +} else { + set calendars_clause "and (cals.package_id= :package_id or (cals.private_p='f' or (cals.private_p='t' and cals.owner_id= :user_id)))" +} +# --calendar-portlet + set package_id [ad_conn package_id] set user_id [ad_conn user_id] # sort by cannot be empty