Index: openacs-4/packages/static-portlet/tcl/static-admin-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/tcl/static-admin-portlet-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/static-portlet/tcl/static-admin-portlet-procs.tcl 10 May 2002 06:30:01 -0000 1.8 +++ openacs-4/packages/static-portlet/tcl/static-admin-portlet-procs.tcl 12 May 2002 18:15:04 -0000 1.9 @@ -18,19 +18,19 @@ Procedures to support the static ADMIN portlet Copyright Openforce, Inc. - Licensed under GNU GPL v2 + Licensed under GNU GPL v2 - @author arjun@openforce.net + @author arjun@openforce.net @cvs-id $Id$ } namespace eval static_admin_portlet { - + ad_proc -private get_my_name { } { return "static_admin_portlet" } - + ad_proc -public get_pretty_name { } { return [oacs_util::parameter \ @@ -48,10 +48,10 @@ } { return "" } - - ad_proc -public add_self_to_page { - portal_id - instance_id + + ad_proc -public add_self_to_page { + {-portal_id:required} + {-package_id:required} } { Adds a static admin PE to the given portal } { @@ -62,37 +62,36 @@ # there is only one static admin portlet per portal so use: set element_id [portal::add_element \ - -portal_id $portal_id \ - -portlet_name [get_my_name] + -portal_id $portal_id \ + -portlet_name [get_my_name] ] # Set the instace of "static" that this PE will know - portal::set_element_param $element_id instance_id $instance_id + portal::set_element_param $element_id package_id $package_id return $element_id } - ad_proc -public remove_self_from_page { - portal_id + ad_proc -public remove_self_from_page { + portal_id } { - Removes static PE from the given page + Removes static PE from the given page } { # This is easy since there's one and only one instace_id portal::remove_element \ - -portal_id $portal_id \ - -portlet_name [get_my_name] + -portal_id $portal_id \ + -portlet_name [get_my_name] } - - ad_proc -public show { - cf + + ad_proc -public show { + cf } { Display the PE } { portal::show_proc_helper \ - -package_key [my_package_key] \ - -config_list $cf \ - -template_src "static-admin-portlet" - } -} - + -package_key [my_package_key] \ + -config_list $cf \ + -template_src "static-admin-portlet" + } +}