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.8 -r1.9 --- openacs-4/packages/calendar-portlet/tcl/calendar-portlet-procs.tcl 9 Nov 2001 19:37:03 -0000 1.8 +++ openacs-4/packages/calendar-portlet/tcl/calendar-portlet-procs.tcl 11 Nov 2001 17:57:37 -0000 1.9 @@ -75,6 +75,7 @@ # otherwise, get the calendar_name for the give_id set calendar_name [calendar_get_name $calendar_id] + set view $config(default_view) # big non-ported query, i'm bad db_foreach get_day_items " @@ -106,7 +107,6 @@ } # shaded_p support version 1 - if { $config(shaded_p) == "f" } { set row_html " @@ -182,7 +182,84 @@ return $output } + + ad_proc -public edit { + element_id + } { + Display the PE's edit page + @return HTML string + @param cf A config array + @author arjun@openforce.net + @creation-date Nov 2001 + } { + + set calendar_id [portal::get_element_param $element_id "calendar_id"] + set current_view [portal::get_element_param $element_id "default_view"] + + switch $current_view { + "day" { + set html "Set default view to:

+ + + day + week + month + year + list + " + } + "week" { + set html "Set default view to:

+ + + day + week + month + year + list + "" + } + "month" { + set html "Set default view to:

+ + + day + week + month + year + list + " + + } + "year" { + set html "Set default view to:

+ + + day + week + month + year + list + " + } + "list" { + set html "Set default view to:

+ + + day + week + month + year + list + " + } + + return $html + } + } + + ad_proc -public remove_self_from_page { portal_id community_id