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 -N -r1.24 -r1.25
--- openacs-4/packages/calendar-portlet/tcl/calendar-portlet-procs.tcl 11 Apr 2002 19:51:02 -0000 1.24
+++ openacs-4/packages/calendar-portlet/tcl/calendar-portlet-procs.tcl 16 Apr 2002 05:16:28 -0000 1.25
@@ -59,7 +59,7 @@
calendar_id
} {
Adds a calendar PE to the given page with the community_id.
-
+
@return element_id The new element's id
@param portal_id The page to add self to
@param calendar_id The new calendar_id to add
@@ -77,7 +77,7 @@
ad_proc -public remove_self_from_page {
portal_id
- package_id
+ calendar_id
} {
Removes a calendar PE from the given page
@@ -86,7 +86,13 @@
@author arjun@openforce.net
@creation-date Sept 2001
} {
- portal::remove_element_or_remove_id -portal_id $portal_id -portlet_name [my_name] -key calendar_id -value_id $package_id
+ ## YOWSA (ben)
+ # calendar portlet should NOT be creating and deleting calendars!
+ # I've taken out a chunk of code here that was removing calendars. No way! (ben).
+
+ # get rid of this portal element
+ # This automatically removes all element params
+ portal::remove_element_or_remove_id -portal_id $portal_id -portlet_name [my_name] -key calendar_id -value_id $calendar_id
}
Index: openacs-4/packages/calendar-portlet/www/calendar-full-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/www/calendar-full-portlet.tcl,v
diff -u -N -r1.12 -r1.13
--- openacs-4/packages/calendar-portlet/www/calendar-full-portlet.tcl 10 Apr 2002 00:56:35 -0000 1.12
+++ openacs-4/packages/calendar-portlet/www/calendar-full-portlet.tcl 16 Apr 2002 05:16:29 -0000 1.13
@@ -64,7 +64,7 @@
set cal_nav [dt_widget_calendar_navigation "" $view $date "page_num=$page_num"]
if {$create_p} {
- set item_template "\$item"
+ set item_template "\$item"
} else {
set item_template "\$item"
}
@@ -84,15 +84,17 @@
-item_template $item_template \
-hour_template $hour_template \
-date $current_date -start_hour 7 -end_hour 22 \
- -calendar_id_list $list_of_calendar_ids]
+ -calendar_id_list $list_of_calendar_ids \
+ -url_stub_callback "calendar_portlet_display::get_url_stub"]
}
if {$view == "week"} {
set cal_stuff [calendar::one_week_display \
-item_template $item_template \
-day_template "\$day - \$pretty_date" \
-date $current_date \
- -calendar_id_list $list_of_calendar_ids]
+ -calendar_id_list $list_of_calendar_ids \
+ -url_stub_callback "calendar_portlet_display::get_url_stub"]
}
if {$view == "month"} {
@@ -101,14 +103,16 @@
-day_template "\$day_number" \
-date $current_date \
-item_add_template $item_add_template \
- -calendar_id_list $list_of_calendar_ids]
+ -calendar_id_list $list_of_calendar_ids \
+ -url_stub_callback "calendar_portlet_display::get_url_stub"]
}
if {$view == "list"} {
set cal_stuff [calendar::list_display \
-item_template {$item} \
-date $current_date \
- -calendar_id_list $list_of_calendar_ids]
+ -calendar_id_list $list_of_calendar_ids \
+ -url_stub_callback "calendar_portlet_display::get_url_stub"]
}
if {$view == "year"} {
Index: openacs-4/packages/calendar-portlet/www/calendar-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/www/calendar-portlet.tcl,v
diff -u -N -r1.12 -r1.13
--- openacs-4/packages/calendar-portlet/www/calendar-portlet.tcl 29 Mar 2002 18:52:51 -0000 1.12
+++ openacs-4/packages/calendar-portlet/www/calendar-portlet.tcl 16 Apr 2002 05:16:29 -0000 1.13
@@ -48,11 +48,7 @@
set current_date $date
set date_format "YYYY-MM-DD HH24:MI"
-if {$create_p} {
- set item_template "\$item"
-} else {
- set item_template "\$item"
-}
+set item_template "\$item"
if {$create_p} {
set hour_template "\$hour"
@@ -69,15 +65,17 @@
-item_template $item_template \
-hour_template $hour_template \
-date $current_date -start_hour 7 -end_hour 22 \
- -calendar_id_list $list_of_calendar_ids]
+ -calendar_id_list $list_of_calendar_ids \
+ -url_stub_callback "calendar_portlet_display::get_url_stub"]
}
if {$view == "week"} {
set cal_stuff [calendar::one_week_display \
-item_template $item_template \
-date $current_date \
- -calendar_id_list $list_of_calendar_ids]
+ -calendar_id_list $list_of_calendar_ids \
+ -url_stub_callback "calendar_portlet_display::get_url_stub"]
}
if {$view == "month"} {
@@ -86,14 +84,16 @@
-day_template "\$day_number" \
-date $current_date \
-item_add_template $item_add_template \
- -calendar_id_list $list_of_calendar_ids]
+ -calendar_id_list $list_of_calendar_ids \
+ -url_stub_callback "calendar_portlet_display::get_url_stub"]
}
if {$view == "list"} {
set cal_stuff [calendar::list_display \
- -item_template {$item} \
+ -item_template $item_template \
-date $current_date \
- -calendar_id_list $list_of_calendar_ids]
+ -calendar_id_list $list_of_calendar_ids \
+ -url_stub_callback "calendar_portlet_display::get_url_stub"]
}