Index: openacs-4/packages/calendar-portlet/www/calendar-admin-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/www/calendar-admin-portlet.adp,v diff -u -N -r1.7 -r1.7.2.1 --- openacs-4/packages/calendar-portlet/www/calendar-admin-portlet.adp 15 Dec 2006 22:45:20 -0000 1.7 +++ openacs-4/packages/calendar-portlet/www/calendar-admin-portlet.adp 3 Mar 2007 19:17:31 -0000 1.7.2.1 @@ -22,5 +22,9 @@ - Index: openacs-4/packages/calendar-portlet/www/calendar-admin-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/www/calendar-admin-portlet.tcl,v diff -u -N -r1.3 -r1.3.16.1 --- openacs-4/packages/calendar-portlet/www/calendar-admin-portlet.tcl 9 Aug 2002 18:39:31 -0000 1.3 +++ openacs-4/packages/calendar-portlet/www/calendar-admin-portlet.tcl 3 Mar 2007 19:17:31 -0000 1.3.16.1 @@ -21,6 +21,8 @@ @author Arjun Sanyal (arjun@openforce.net) @author Ben Adida (ben@openforce.net) @cvs_id $Id$ +} { + {period_days:optional} } -properties { } @@ -30,6 +32,15 @@ set view $config(default_view) set list_of_calendar_ids $config(calendar_id) +set calendar_id [lindex $list_of_calendar_ids 0] +db_0or1row select_calendar_package_id {select package_id from calendars where calendar_id=:calendar_id} + +if { ![info exists period_days] } { + set period_days [parameter::get -package_id $package_id -parameter ListView_DefaultPeriodDays] +} else { + parameter::set_value -package_id $package_id -parameter ListView_DefaultPeriodDays -value $period_days +} + if {[llength $list_of_calendar_ids] > 1} { return -code error "shouldn't be more than one calendar in admin!" } Index: openacs-4/packages/calendar-portlet/www/calendar-full-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/www/calendar-full-portlet.adp,v diff -u -N -r1.26.2.2 -r1.26.2.3 --- openacs-4/packages/calendar-portlet/www/calendar-full-portlet.adp 22 Feb 2007 22:22:39 -0000 1.26.2.2 +++ openacs-4/packages/calendar-portlet/www/calendar-full-portlet.adp 3 Mar 2007 19:17:31 -0000 1.26.2.3 @@ -118,7 +118,7 @@ -
+ + #new-portal.when_portlet_shaded# +
- - 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.34.6.1 -r1.34.6.2 --- openacs-4/packages/calendar-portlet/www/calendar-full-portlet.tcl 15 Feb 2007 16:41:40 -0000 1.34.6.1 +++ openacs-4/packages/calendar-portlet/www/calendar-full-portlet.tcl 3 Mar 2007 19:17:31 -0000 1.34.6.2 @@ -24,7 +24,7 @@ {view ""} {page_num ""} {date ""} - {period_days 30} + {period_days:optional} {julian_date ""} } -properties { Index: openacs-4/packages/calendar-portlet/www/calendar-list-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/www/calendar-list-portlet.adp,v diff -u -N -r1.8.6.1 -r1.8.6.2 --- openacs-4/packages/calendar-portlet/www/calendar-list-portlet.adp 15 Feb 2007 16:41:40 -0000 1.8.6.1 +++ openacs-4/packages/calendar-portlet/www/calendar-list-portlet.adp 3 Mar 2007 19:17:31 -0000 1.8.6.2 @@ -36,5 +36,7 @@ sort_by=@sort_by@> -
-
+ + #new-portal.when_portlet_shaded# + + \ No newline at end of file Index: openacs-4/packages/calendar-portlet/www/calendar-list-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/www/calendar-list-portlet.tcl,v diff -u -N -r1.10.2.1 -r1.10.2.2 --- openacs-4/packages/calendar-portlet/www/calendar-list-portlet.tcl 15 Feb 2007 16:41:40 -0000 1.10.2.1 +++ openacs-4/packages/calendar-portlet/www/calendar-list-portlet.tcl 3 Mar 2007 19:17:31 -0000 1.10.2.2 @@ -25,7 +25,7 @@ {page_num ""} {date ""} {julian_date ""} - {period_days 30} + {period_days:optional} {sort_by ""} } -properties { @@ -47,6 +47,17 @@ } set list_of_calendar_ids $config(calendar_id) +# Set the first list entry to calendar_id. Will not be used if under +# dotlrn. Otherwise the list will actually contain only one calendar_id +# (the first one, though) +set calendar_id [lindex $list_of_calendar_ids 0] +# Get the package_id depending on which calender_id was set +db_0or1row select_calendar_package_id {select package_id from calendars where calendar_id=:calendar_id} + +if { ![info exists period_days] } { + set period_days [parameter::get -package_id $package_id -parameter DefaultPeriodDays -default 31] +} + set scoped_p $config(scoped_p) if {$scoped_p == "t"} { set show_calendar_name_p 1 Index: openacs-4/packages/calendar-portlet/www/calendar-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/www/calendar-portlet.adp,v diff -u -N -r1.16 -r1.16.6.1 --- openacs-4/packages/calendar-portlet/www/calendar-portlet.adp 17 May 2004 15:15:01 -0000 1.16 +++ openacs-4/packages/calendar-portlet/www/calendar-portlet.adp 3 Mar 2007 19:17:31 -0000 1.16.6.1 @@ -80,5 +80,7 @@ -   - + + #new-portal.when_portlet_shaded# + + \ No newline at end of file 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.29 -r1.29.2.1 --- openacs-4/packages/calendar-portlet/www/calendar-portlet.tcl 8 Aug 2006 21:26:19 -0000 1.29 +++ openacs-4/packages/calendar-portlet/www/calendar-portlet.tcl 3 Mar 2007 19:17:31 -0000 1.29.2.1 @@ -24,7 +24,7 @@ {view ""} {page_num ""} {date ""} - {period_days 30} + {period_days:optional} {julian_date ""} } -properties { @@ -38,6 +38,7 @@ } } +set period_days [parameter::get -parameter ListView_DefaultPeriodDays -default 30] # get stuff out of the config array array set config $cf