Index: openacs-4/packages/calendar-portlet/calendar-portlet.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/calendar-portlet.info,v diff -u -r1.3 -r1.4 --- openacs-4/packages/calendar-portlet/calendar-portlet.info 20 Jan 2002 19:18:42 -0000 1.3 +++ openacs-4/packages/calendar-portlet/calendar-portlet.info 23 Jan 2002 05:09:37 -0000 1.4 @@ -34,7 +34,7 @@ - + Index: openacs-4/packages/calendar-portlet/sql/oracle/calendar-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/sql/oracle/calendar-portlet-create.sql,v diff -u -r1.14 -r1.15 --- openacs-4/packages/calendar-portlet/sql/oracle/calendar-portlet-create.sql 19 Jan 2002 23:20:09 -0000 1.14 +++ openacs-4/packages/calendar-portlet/sql/oracle/calendar-portlet-create.sql 23 Jan 2002 05:09:37 -0000 1.15 @@ -245,3 +245,6 @@ insert into hours_of_the_day values (21); insert into hours_of_the_day values (22); insert into hours_of_the_day values (23); + + +@calendar-admin-portlet-create.sql Index: openacs-4/packages/calendar-portlet/tcl/calendar-admin-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/tcl/calendar-admin-portlet-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/calendar-portlet/tcl/calendar-admin-portlet-procs.tcl 19 Jan 2002 20:47:42 -0000 1.1 +++ openacs-4/packages/calendar-portlet/tcl/calendar-admin-portlet-procs.tcl 23 Jan 2002 05:09:37 -0000 1.2 @@ -28,9 +28,9 @@ ad_proc -public get_pretty_name { } { - return [ad_parameter \ + return "[ad_parameter \ -package_id [apm_package_id_from_key [my_package_key]] \ - "pretty_name"] + pretty_name] Administration" } ad_proc -public link { 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 -r1.18 -r1.19 --- openacs-4/packages/calendar-portlet/tcl/calendar-portlet-procs.tcl 17 Jan 2002 22:14:27 -0000 1.18 +++ openacs-4/packages/calendar-portlet/tcl/calendar-portlet-procs.tcl 23 Jan 2002 05:09:37 -0000 1.19 @@ -27,7 +27,7 @@ ad_proc -public get_pretty_name { } { - return [ad_parameter \ + return [ad_parameter \ -package_id [apm_package_id_from_key [my_package_key]] \ "pretty_name"] } @@ -38,6 +38,7 @@ } ad_proc -public add_self_to_page { + {-page_id ""} portal_id calendar_id } { @@ -50,6 +51,7 @@ @creation-date Sept 2001 } { return [portal::add_element_or_append_id -portal_id $portal_id \ + -page_id $page_id \ -portlet_name [my_name] \ -value_id $calendar_id \ -key calendar_id] Index: openacs-4/packages/dotlrn-calendar/dotlrn-calendar.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-calendar/dotlrn-calendar.info,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-calendar/dotlrn-calendar.info 26 Oct 2001 16:20:55 -0000 1.1 +++ openacs-4/packages/dotlrn-calendar/dotlrn-calendar.info 23 Jan 2002 05:09:32 -0000 1.2 @@ -10,11 +10,12 @@ oracle + postgresql Arjun Sanyal blah blah - + @@ -23,7 +24,7 @@ - + Index: openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl 20 Jan 2002 19:20:11 -0000 1.19 +++ openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl 23 Jan 2002 05:09:32 -0000 1.20 @@ -45,6 +45,12 @@ return "dotLRN Calendar" } + ad_proc -public get_user_default_page {} { + return the user default page to add the portlet to + } { + return [ad_parameter -package_id [apm_package_id_from_key dotlrn-calendar] user_default_page] + } + ad_proc -public add_applet { } { Called for one time init - must be repeatable! @@ -90,6 +96,10 @@ [portal::add_element $portal_template_id \ [calendar_portlet::my_name]] + # set the group_calendar_id parameter in the portal template, + portal::set_element_param \ + $element_id "group_calendar_id" $group_calendar_id + # Add the admin portlet, too set admin_portal_id \ [dotlrn_community::get_community_admin_portal_id $community_id] @@ -100,10 +110,6 @@ [portal::add_element $admin_portal_id \ [calendar_admin_portlet::my_name]] - # set the group_calendar_id parameter in the portal template, - portal::set_element_param \ - $element_id "group_calendar_id" $group_calendar_id - # automount calendar in this community set node_id [site_nodes::get_node_id_from_url \ -url [dotlrn_community::get_url_from_package_id \ @@ -191,7 +197,9 @@ calendar_portlet::make_self_available $portal_id # Call the portal element to be added correctly - calendar_portlet::add_self_to_page $portal_id $g_cal_id + calendar_portlet::add_self_to_page \ + -page_id [portal::get_page_id -portal_id $portal_id -page_name [get_user_default_page]] \ + $portal_id $g_cal_id # Now for the user workspace # set this calendar_id in the workspace portal