Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl 23 Jan 2002 07:36:31 -0000 1.3
+++ openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl 23 Jan 2002 08:11:02 -0000 1.4
@@ -83,7 +83,8 @@
ad_proc dt_widget_day {
{
-calendar_details ""
- -date ""
+ -date ""
+ -hour_template {$display_hour}
-start_hour {0}
-end_hour {23}
-show_nav 1
@@ -125,7 +126,7 @@
append return_html "
< $day_of_the_week > |
\n"
}
- for {set hour $start_hour} {$hour < $end_hour} {incr hour} {
+ for {set hour $start_hour} {$hour <= $end_hour} {incr hour} {
if {$hour < 10} {
set index_hour "0$hour"
@@ -160,6 +161,7 @@
append display_hour "am"
}
+ set display_hour [subst $hour_template]
append return_html "$display_hour | "
if {[ns_set find $calendar_details $index_hour] != -1} {
Index: openacs-4/packages/calendar/calendar.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/calendar.info,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/calendar/calendar.info 8 Dec 2001 01:17:59 -0000 1.7
+++ openacs-4/packages/calendar/calendar.info 23 Jan 2002 08:11:16 -0000 1.8
@@ -44,6 +44,8 @@
+
+
@@ -90,6 +92,8 @@
+
+
@@ -104,7 +108,9 @@
+
+
Index: openacs-4/packages/calendar/tcl/calendar-display-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/Attic/calendar-display-procs.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/calendar/tcl/calendar-display-procs.tcl 22 Jan 2002 05:15:39 -0000 1.1
+++ openacs-4/packages/calendar/tcl/calendar-display-procs.tcl 23 Jan 2002 08:11:16 -0000 1.2
@@ -126,11 +126,16 @@
ad_proc -public one_day_display {
{-date ""}
{-calendar_id_list ""}
- {-one_hour_link ""}
- {-one_item_link ""}
+ {-hour_template {$hour}}
+ {-item_template {$item}}
+ {-start_hour 0}
+ {-end_hour 23}
} {
Creates a day widget
} {
+ set widget_start_hour $start_hour
+ set widget_end_hour $end_hour
+
set date_format "YYYY-MM-DD HH24:MI"
if {[empty_string_p $date]} {
@@ -151,20 +156,27 @@
# Loop through the calendars
foreach calendar_id $calendar_id_list {
set calendar_name [calendar_get_name $calendar_id]
+ ns_log Notice "bma: one calendar $calendar_name"
db_foreach select_day_items {} {
set item "$pretty_start_date - $pretty_end_date: $name ($calendar_name)"
- if {![empty_string_p $one_item_link]} {
- set item "$item
"
- }
+ set item [subst $item_template]
+ ns_log Notice "bma-calendar: adding $item at $start_hour"
ns_set put $items $start_hour $item
}
}
- return [dt_widget_day -calendar_details $items -date $date]
+ set hour {$display_hour}
+ set start_time {$hour:00}
+ set hour_template [subst $hour_template]
+
+ return [dt_widget_day -hour_template $hour_template \
+ -start_hour $widget_start_hour -end_hour $widget_end_hour \
+ -calendar_details $items -date $date]
+
}
}
Index: openacs-4/packages/calendar/www/cal-item-create.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-item-create.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/calendar/www/cal-item-create.tcl 9 Jan 2002 23:53:35 -0000 1.3
+++ openacs-4/packages/calendar/www/cal-item-create.tcl 23 Jan 2002 08:11:16 -0000 1.4
@@ -17,6 +17,7 @@
{description ""}
{date now}
{calendar_id "-1"}
+ {return_url ""}
}
if { $date == "now" } {
@@ -110,7 +111,7 @@
# set the date to be the date of the event
set date [calendar_make_date [array get event_date]]
-ad_returnredirect "?[export_url_vars date action view calendar_id]"
+ad_returnredirect "${return_url}?[export_url_vars date action view calendar_id]"
Index: openacs-4/packages/calendar/www/cal-item.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-item.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/calendar/www/cal-item.adp 23 Apr 2001 23:09:38 -0000 1.1
+++ openacs-4/packages/calendar/www/cal-item.adp 23 Jan 2002 08:11:16 -0000 1.2
@@ -15,6 +15,7 @@
Index: openacs-4/packages/calendar/www/cal-item.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-item.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/calendar/www/cal-item.tcl 9 Jan 2002 23:51:27 -0000 1.3
+++ openacs-4/packages/calendar/www/cal-item.tcl 23 Jan 2002 08:11:16 -0000 1.4
@@ -13,6 +13,7 @@
{cal_item_id 0}
{start_time "now"}
{end_time "now"}
+ {return_url ""}
} -properties {
cal_item_id:onevalue
Index: openacs-4/packages/calendar/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/index.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/calendar/www/index.tcl 23 Sep 2001 15:15:02 -0000 1.2
+++ openacs-4/packages/calendar/www/index.tcl 23 Jan 2002 08:11:16 -0000 1.3
@@ -12,6 +12,7 @@
{action view}
{date now}
{calendar_list:multiple,optional {}}
+ {return_url ""}
} -properties {
package_id:onevalue
user_id:onevalue