Index: openacs-4/packages/dotlrn-portlet/tcl/dotlrn-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/tcl/dotlrn-portlet-procs.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/dotlrn-portlet/tcl/dotlrn-portlet-procs.tcl 23 Jan 2002 01:30:55 -0000 1.20 +++ openacs-4/packages/dotlrn-portlet/tcl/dotlrn-portlet-procs.tcl 14 Feb 2002 19:47:44 -0000 1.21 @@ -16,9 +16,15 @@ ad_proc -private my_name { } { - return "dotlrn_portlet" + return "dotlrn_portlet" } + ad_proc -private my_package_key { + } { + return "dotlrn-portlet" + } + + ad_proc -public get_pretty_name { } { return "Group Information" @@ -59,39 +65,15 @@ ad_proc -public show { cf } { - Display the PE + Call the template to display - @return HTML string @param cf A config array @author arjun@openforce.net - @creation-date Sept 2001 } { + portal::show_proc_helper \ + -package_key [my_package_key] \ + -config_list $cf - array set config $cf - - set query "select pretty_name, description - from dotlrn_communities - where community_id = $config(community_id)" - - if { $config(shaded_p) == "f" } { - - # for now query the DM directly - if { [db_0or1row select_comminity_info $query] } { - set data "$pretty_name - $description" - } else { - set data "Group info not found. Contact webmaster, please!" - } - - # BIG BAD THING (fixme: ben) - if {[dotlrn::user_can_read_private_data_p]} { - append data "

List of Members" - } - } else { - set data "" - } - - return $data - } ad_proc -public remove_self_from_page { Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.adp 11 Feb 2002 06:05:30 -0000 1.3 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.adp 14 Feb 2002 19:47:44 -0000 1.4 @@ -34,12 +34,12 @@

-
  • Subgroups: +
  • @sub_pretty_plural@:
  • Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.tcl 11 Feb 2002 06:05:30 -0000 1.3 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.tcl 14 Feb 2002 19:47:44 -0000 1.4 @@ -23,5 +23,10 @@ # hack for now set n_subgroups 0 +# get the right pretty name, plural for subgroups +set sub_pretty_name [ad_parameter subcommunities_pretty_name] +set sub_pretty_plural [ad_parameter subcommunities_pretty_plural] + + ad_return_template Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.adp 14 Feb 2002 19:47:44 -0000 1.1 @@ -0,0 +1,14 @@ + + + @pretty_name@ - @description@ + +

    + + @member_link@ + +

    + + @subcomm_data@ + + + Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.tcl 14 Feb 2002 19:47:44 -0000 1.1 @@ -0,0 +1,40 @@ +# www/dotlrn-portlet.tcl +ad_page_contract { + The display logic for the dotrn (Group Info) portlet + + @author Arjun Sanyal (arjun@openforce.net) + @cvs_id $Id: dotlrn-portlet.tcl,v 1.1 2002/02/14 19:47:44 arjun Exp $ +} -properties { + +} + +array set config $cf +set community_id $config(community_id) + +set pretty_name [dotlrn_community::get_community_name $community_id] +set description [dotlrn_community::get_community_description $community_id] + +if {[dotlrn::user_can_read_private_data_p]} { + set member_link "

    List of Members" +} else { + set member_link "" +} + +set subcomm_list [dotlrn_community::get_subcomm_list -community_id $community_id] + +if {[llength $subcomm_list] > 0} { + + set subcomm_data "Subcommunities:

    " + +} else { + + set subcomm_data "" +} +