Index: openacs-4/packages/dotlrn-wps/tcl/wps-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-wps/tcl/Attic/wps-portlet-procs.tcl,v diff -u -N --- openacs-4/packages/dotlrn-wps/tcl/wps-portlet-procs.tcl 25 Sep 2003 16:35:43 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,103 +0,0 @@ -# -# Copyright (C) 2001, 2002 MIT -# -# This file is part of dotLRN. -# -# dotLRN is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# - -ad_library { - - Procedures to support the news portlet - - @creation-date Nov 2001 - @author arjun@openforce.net - @cvs-id $Id: wps-portlet-procs.tcl,v 1.1 2003/09/25 16:35:43 rocaelh Exp $ - -} - -namespace eval wps_portlet { - - ad_proc -private get_my_name { - } { - return "wps_portlet" - } - - ad_proc -private my_package_key { - } { - return "wps-portlet" - } - - ad_proc -public get_pretty_name { - } { - return [parameter::get_from_package_key \ - -package_key [my_package_key] \ - -parameter pretty_name \ - -default "Wimpy Point" - ] - } - - ad_proc -public link { - } { - return "" - } - - ad_proc -public add_self_to_page { - {-portal_id:required} - {-package_id:required} - {-param_action:required} - } { - Adds a wps PE to the given portal. - - @param portal_id The page to add self to - @param package_id The community with the folder - - @return element_id The new element's id - } { - return [portal::add_element_parameters \ - -portal_id $portal_id \ - -portlet_name [get_my_name] \ - -value $package_id \ - -force_region [parameter::get_from_package_key \ - -parameter "wps_portlet_force_region" \ - -package_key [my_package_key]] \ - -pretty_name [get_pretty_name] \ - -param_action $param_action - ] - } - - ad_proc -public remove_self_from_page { - {-portal_id:required} - {-package_id:required} - } { - Removes a wps PE from the given page or the package_id of the - wps package from the portlet if there are others remaining - - @param portal_id The page to remove self from - @param package_id - } { - portal::remove_element_parameters \ - -portal_id $portal_id \ - -portlet_name [get_my_name] \ - -value $package_id - } - - ad_proc -public show { - cf - } { - } { - portal::show_proc_helper \ - -package_key [my_package_key] \ - -config_list $cf \ - -template_src "wps-portlet" - } - -}