Index: openacs-4/packages/calendar/calendar.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/calendar.info,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/calendar/calendar.info 5 Sep 2001 12:01:35 -0000 1.3
+++ openacs-4/packages/calendar/calendar.info 23 Sep 2001 15:13:26 -0000 1.4
@@ -73,6 +73,8 @@
+
+
@@ -81,8 +83,12 @@
+
+
+
+
Index: openacs-4/packages/calendar/www/cal-weekview-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-weekview-oracle.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/calendar/www/cal-weekview-oracle.xql 24 Aug 2001 01:47:36 -0000 1.1
+++ openacs-4/packages/calendar/www/cal-weekview-oracle.xql 23 Sep 2001 15:12:41 -0000 1.2
@@ -18,4 +18,62 @@
+
+
+
+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
+ )
+
+
+
+
+
+
+
+
+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
+ )
+
+
+
+
+
Index: openacs-4/packages/calendar/www/cal-weekview-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-weekview-postgresql.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/calendar/www/cal-weekview-postgresql.xql 17 Sep 2001 06:49:49 -0000 1.4
+++ openacs-4/packages/calendar/www/cal-weekview-postgresql.xql 23 Sep 2001 15:12:41 -0000 1.5
@@ -8,14 +8,72 @@
select to_char(to_date(:current_date, 'yyyy-mm-dd'), 'D')
as day_of_the_week,
- to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'SUNDAY'),'YYYY-MM-DD')
+ to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'SUNDAY'), 'YYYY-MM-DD')
as sunday_of_the_week,
- to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')+7, 'Saturday'),'YYYY-MM-DD')
+ to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')+7, 'Saturday'), 'YYYY-MM-DD')
as saturday_of_the_week
from dual
+
+
+
+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
+ )
+
+
+
+
+
+
+
+
+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
+ )
+
+
+
+
+
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)
"
Index: openacs-4/packages/calendar/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/index.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/calendar/www/index.adp 23 Apr 2001 23:09:38 -0000 1.1
+++ openacs-4/packages/calendar/www/index.adp 23 Sep 2001 15:12:41 -0000 1.2
@@ -8,7 +8,7 @@
-ArsDigita Calendar for User # @user_id@
+ArsDigita Calendar for @name@ @user_id@
Index: openacs-4/packages/calendar/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/index.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/calendar/www/index.tcl 23 Apr 2001 23:09:38 -0000 1.1
+++ openacs-4/packages/calendar/www/index.tcl 23 Sep 2001 15:15:02 -0000 1.2
@@ -15,7 +15,7 @@
} -properties {
package_id:onevalue
user_id:onevalue
-
+ name:onevalue
date:onevalue
view:onevalue
}
@@ -24,6 +24,13 @@
# find out the user_id
set user_id [ad_verify_and_get_user_id]
+db_0or1row user_name_select {
+ select first_names || ' ' || last_name as name, email
+ from persons, parties
+ where person_id = :user_id
+ and person_id = party_id
+}
+
set package_id [ad_conn package_id]